mirror of
https://github.com/bookwyrm-social/bookwyrm.git
synced 2024-11-27 03:51:08 +00:00
Sort domains in admin view
This commit is contained in:
parent
e218b73272
commit
b9fde85b49
1 changed files with 3 additions and 3 deletions
|
@ -20,9 +20,9 @@ class LinkDomain(View):
|
||||||
def get(self, request, status="pending"):
|
def get(self, request, status="pending"):
|
||||||
"""view pending domains"""
|
"""view pending domains"""
|
||||||
data = {
|
data = {
|
||||||
"domains": models.LinkDomain.objects.filter(status=status).prefetch_related(
|
"domains": models.LinkDomain.objects.filter(status=status)
|
||||||
"links"
|
.prefetch_related("links")
|
||||||
),
|
.order_by("-created_date"),
|
||||||
"counts": {
|
"counts": {
|
||||||
"pending": models.LinkDomain.objects.filter(status="pending").count(),
|
"pending": models.LinkDomain.objects.filter(status="pending").count(),
|
||||||
"approved": models.LinkDomain.objects.filter(status="approved").count(),
|
"approved": models.LinkDomain.objects.filter(status="approved").count(),
|
||||||
|
|
Loading…
Reference in a new issue