mirror of
https://github.com/bookwyrm-social/bookwyrm.git
synced 2024-12-18 14:16:45 +00:00
Adds local only filter to user admin view
This commit is contained in:
parent
343e5772d2
commit
71404fae06
2 changed files with 4 additions and 0 deletions
|
@ -3,4 +3,5 @@
|
||||||
{% block filter_fields %}
|
{% block filter_fields %}
|
||||||
{% include 'user_admin/server_filter.html' %}
|
{% include 'user_admin/server_filter.html' %}
|
||||||
{% include 'user_admin/username_filter.html' %}
|
{% include 'user_admin/username_filter.html' %}
|
||||||
|
{% include 'directory/community_filter.html' %}
|
||||||
{% endblock %}
|
{% endblock %}
|
||||||
|
|
|
@ -30,6 +30,9 @@ class UserAdminList(View):
|
||||||
username = request.GET.get("username")
|
username = request.GET.get("username")
|
||||||
if username:
|
if username:
|
||||||
filters["username__icontains"] = username
|
filters["username__icontains"] = username
|
||||||
|
scope = request.GET.get("scope")
|
||||||
|
if scope:
|
||||||
|
filters["local"] = scope == "local"
|
||||||
|
|
||||||
users = models.User.objects.filter(**filters)
|
users = models.User.objects.filter(**filters)
|
||||||
|
|
||||||
|
|
Loading…
Reference in a new issue