Skip to content

Commit

Permalink
Apply default filter to People-User table (#4199)
Browse files Browse the repository at this point in the history
  • Loading branch information
dimasciput committed Aug 29, 2024
1 parent 106426f commit 9218bb7
Showing 1 changed file with 9 additions and 0 deletions.
9 changes: 9 additions & 0 deletions bims/admin.py
Original file line number Diff line number Diff line change
Expand Up @@ -924,6 +924,15 @@ def response_add(self, request, obj, post_url_continue=None):
return super(CustomUserAdmin, self).response_add(
request, obj, post_url_continue)

def changelist_view(self, request, extra_context=None):
test = request.META['HTTP_REFERER'].split(request.META['PATH_INFO'])
if test[-1] and not test[-1].startswith('?'):
if 'signed_up' not in request.GET:
q = request.GET.copy()
q['signed_up'] = 'True'
request.GET = q
request.META['QUERY_STRING'] = request.GET.urlencode()
return super().changelist_view(request, extra_context=extra_context)

class BaseMapLayerAdmin(OrderedModelAdmin):
list_display = (
Expand Down

0 comments on commit 9218bb7

Please sign in to comment.