Skip to content
GitLab
Projects
Groups
Snippets
/
Help
Help
Support
Community forum
Keyboard shortcuts
?
Submit feedback
Contribute to GitLab
Sign in
Toggle navigation
Menu
Open sidebar
thalia
concrexit
Commits
4c42fa17
Commit
4c42fa17
authored
Nov 30, 2016
by
Joren Vrancken
Browse files
Fix #177
parent
f2794ce5
Changes
1
Hide whitespace changes
Inline
Side-by-side
website/events/admin.py
View file @
4c42fa17
...
...
@@ -70,7 +70,7 @@ class EventAdmin(DoNextModelAdmin):
def
num_participants
(
self
,
obj
):
"""Pretty-print the number of participants"""
num
=
(
obj
.
registration_set
.
filter
(
date_cancelled__lt
=
timezone
.
now
()).
count
())
.
exclude
(
date_cancelled__lt
=
timezone
.
now
()).
count
())
if
not
obj
.
max_participants
:
return
'{}/∞'
.
format
(
num
)
return
'{}/{}'
.
format
(
num
,
obj
.
max_participants
)
...
...
Write
Preview
Supports
Markdown
0%
Try again
or
attach a new file
.
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment