Skip to content
Snippets Groups Projects
Commit 4e59dd36 authored by Parbhat Puri's avatar Parbhat Puri
Browse files

Add notes

parent 26cefa24
No related branches found
No related tags found
No related merge requests found
......@@ -22,6 +22,10 @@ delete_user_perm = "{0}.delete_{1}".format(AUTH_USER_APP_LABEL, AUTH_USER_MODEL_
@any_permission_required(add_user_perm, change_user_perm, delete_user_perm)
@vary_on_headers('X-Requested-With')
def index(request):
"""
Override wagtail's users index view to filter by full_name
https://github.com/wagtail/wagtail/blob/af69cb4a544a1b9be1339546be62ff54b389730e/wagtail/users/views/users.py#L47
"""
q = None
is_searching = False
......@@ -47,7 +51,7 @@ def index(request):
if 'email' in model_fields:
conditions |= Q(email__icontains=term)
# Custom code for filter by full_name
# filter by full_name
if 'full_name' in model_fields:
conditions |= Q(full_name__icontains=term)
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment