1
0
mirror of https://gitlab.com/animath/si/plateforme.git synced 2025-08-15 15:30:04 +02:00

Display edit password button

This commit is contained in:
Yohann D'ANELLO
2021-01-18 15:43:17 +01:00
parent b4da740fb6
commit a454441097
2 changed files with 11 additions and 2 deletions

View File

@@ -20,7 +20,7 @@ class RegistrationTable(tables.Table):
def order_type(self, queryset, desc):
types = ["volunteerregistration__adminregistration", "volunteerregistration", "participantregistration"]
return queryset.order_by(*(("" if desc else "-") + t for t in types)), True
return queryset.order_by(*(("-" if desc else "") + t for t in types)), True
class Meta:
attrs = {
@@ -28,5 +28,5 @@ class RegistrationTable(tables.Table):
}
model = Registration
fields = ('last_name', 'user__first_name', 'user__email', 'type',)
order_by = ('volunteerregistration__adminregistration', 'volunteerregistration', 'last_name', 'first_name',)
order_by = ('type', 'last_name', 'first_name',)
template_name = 'django_tables2/bootstrap4.html'