forked from mirrors/bookwyrm
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