Admin views
hypha.apply.users.admin_views
¶
UserFilterSet
¶
CustomUserIndexView
¶
Bases: Index
Override wagtail's users index view to filter by full_name. This view also allows for the addition of custom fields to the list_export and list filtering.
list_export
class-attribute
instance-attribute
¶
list_export = ['email', 'full_name', 'slack', 'roles', 'is_superuser', 'is_active', 'date_joined', 'last_login']
get_context_data
¶
Source code in hypha/apply/users/admin_views.py
get_queryset
¶
Override the original queryset to filter by full_name, mostly copied from super().get_queryset() with the addition of the custom code
Source code in hypha/apply/users/admin_views.py
CustomGroupIndexView
¶
Bases: IndexView
Overriding of wagtail.users.views.groups.IndexView to allow for the addition of help text to the displayed group names. This is done utilizing the get_queryset method
get_queryset
¶
Overriding the normal queryset that would return all Group objects, this returned an iterable of groups with custom names containing HTML help text.
Source code in hypha/apply/users/admin_views.py
CustomGroupViewSet
¶
Bases: GroupViewSet
Overriding the wagtail.users.views.groups.GroupViewSet just to use custom users view(index) when getting all users for a group.