Improves user admin filter behavior
This commit is contained in:
parent
07ba880ff7
commit
a68196d9bb
@ -1,7 +1,7 @@
|
|||||||
{% extends 'snippets/filters_panel/filters_panel.html' %}
|
{% extends 'snippets/filters_panel/filters_panel.html' %}
|
||||||
|
|
||||||
{% block filter_fields %}
|
{% block filter_fields %}
|
||||||
{% include 'user_admin/server_filter.html' %}
|
|
||||||
{% include 'user_admin/username_filter.html' %}
|
{% include 'user_admin/username_filter.html' %}
|
||||||
{% include 'directory/community_filter.html' %}
|
{% include 'directory/community_filter.html' %}
|
||||||
|
{% include 'user_admin/server_filter.html' %}
|
||||||
{% endblock %}
|
{% endblock %}
|
||||||
|
@ -31,8 +31,8 @@ class UserAdminList(View):
|
|||||||
if username:
|
if username:
|
||||||
filters["username__icontains"] = username
|
filters["username__icontains"] = username
|
||||||
scope = request.GET.get("scope")
|
scope = request.GET.get("scope")
|
||||||
if scope:
|
if scope and scope == "local":
|
||||||
filters["local"] = scope == "local"
|
filters["local"] = True
|
||||||
|
|
||||||
users = models.User.objects.filter(**filters)
|
users = models.User.objects.filter(**filters)
|
||||||
|
|
||||||
|
Loading…
x
Reference in New Issue
Block a user