1
0
mirror of https://gitlab.crans.org/bde/nk20 synced 2025-06-21 01:48:21 +02:00

More API filters for the permission app

This commit is contained in:
Yohann D'ANELLO
2020-12-22 12:42:54 +01:00
parent eae091625a
commit d47799e6ee
2 changed files with 10 additions and 6 deletions

View File

@ -53,8 +53,8 @@ class MembershipViewSet(ReadProtectedModelViewSet):
filterset_fields = ['club__name', 'club__email', 'club__note__alias__name', 'club__note__alias__normalized_name',
'user__username', 'user__last_name', 'user__first_name', 'user__email',
'user__note__alias__name', 'user__note__alias__normalized_name',
'date_start', 'date_end', 'fee', ]
'date_start', 'date_end', 'fee', 'roles', ]
ordering_fields = ['id', 'date_start', 'date_end', ]
search_fields = ['$club__name', '$club__email', '$club__note__alias__name', '$club__note__alias__normalized_name',
'$user__username', '$user__last_name', '$user__first_name', '$user__email',
'$user__note__alias__name', '$user__note__alias__normalized_name', ]
'$user__note__alias__name', '$user__note__alias__normalized_name', '$roles__name', ]