mirror of
https://github.com/bookwyrm-social/bookwyrm.git
synced 2024-12-18 06:06:34 +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 %}
|
||||
{% include 'user_admin/server_filter.html' %}
|
||||
{% include 'user_admin/username_filter.html' %}
|
||||
{% include 'directory/community_filter.html' %}
|
||||
{% endblock %}
|
||||
|
|
|
@ -30,6 +30,9 @@ class UserAdminList(View):
|
|||
username = request.GET.get("username")
|
||||
if username:
|
||||
filters["username__icontains"] = username
|
||||
scope = request.GET.get("scope")
|
||||
if scope:
|
||||
filters["local"] = scope == "local"
|
||||
|
||||
users = models.User.objects.filter(**filters)
|
||||
|
||||
|
|
Loading…
Reference in a new issue