mirror of
https://gitlab.com/animath/si/plateforme.git
synced 2025-07-03 19:22:51 +02:00
Register new organizers
This commit is contained in:
@ -18,10 +18,15 @@ class RegistrationTable(tables.Table):
|
||||
accessor="user__last_name",
|
||||
)
|
||||
|
||||
def order_type(self, queryset, desc):
|
||||
types = ["volunteerregistration__adminregistration", "volunteerregistration", "participantregistration"]
|
||||
return queryset.order_by(*(("" if desc else "-") + t for t in types)), True
|
||||
|
||||
class Meta:
|
||||
attrs = {
|
||||
'class': 'table table-condensed table-striped',
|
||||
}
|
||||
model = Registration
|
||||
fields = ('last_name', 'user__first_name', 'user__email', 'type',)
|
||||
order_by = ('volunteerregistration__adminregistration', 'volunteerregistration', 'last_name', 'first_name',)
|
||||
template_name = 'django_tables2/bootstrap4.html'
|
||||
|
Reference in New Issue
Block a user