From 2e396c0723d0eea685ec345ae99861b2501710d5 Mon Sep 17 00:00:00 2001 From: Tasos Katsoulas Date: Fri, 7 Apr 2017 16:05:04 +0300 Subject: [PATCH] Enhance group membership admin filters. * Remove old geolocation search fields from admin. --- mozillians/groups/admin.py | 15 ++++++++------- 1 file changed, 8 insertions(+), 7 deletions(-) diff --git a/mozillians/groups/admin.py b/mozillians/groups/admin.py index c5f9de01a..3188be013 100644 --- a/mozillians/groups/admin.py +++ b/mozillians/groups/admin.py @@ -298,14 +298,15 @@ class GroupMembershipAdmin(MozilliansAdminExportMixin, admin.ModelAdmin): resource_class = GroupMembershipResource list_display = ['group', 'userprofile', 'status', 'date_joined', 'updated_on'] search_fields = [ - 'group__name', 'group__url', 'group__description', - 'group__aliases__name', 'group__aliases__url', - 'userprofile__full_name', 'userprofile__ircname', - 'userprofile__geo_region__name', 'userprofile__geo_city__name', - 'userprofile__geo_country__name', 'userprofile__user__username', - 'userprofile__user__email' + 'group__name', 'group__url', 'group__description', 'group__aliases__name', + 'group__aliases__url', 'userprofile__full_name', 'userprofile__ircname', + 'userprofile__user__username', 'userprofile__user__email' ] - list_filter = [NeedsRenewalFilter] + list_filter = ( + NeedsRenewalFilter, + ('updated_on', admin.DateFieldListFilter,), + 'status', + ) form = BaseGroupMembershipAutocompleteForm