forked from mirrors/bookwyrm
Show recent servers first
This commit is contained in:
parent
22f01508d2
commit
be7fae2053
2 changed files with 2 additions and 2 deletions
|
@ -33,7 +33,7 @@
|
|||
{% include 'snippets/table-sort-header.html' with field="server_name" sort=sort text=text %}
|
||||
</th>
|
||||
<th>
|
||||
{% trans "Date federated" as text %}
|
||||
{% trans "Date added" as text %}
|
||||
{% include 'snippets/table-sort-header.html' with field="created_date" sort=sort text=text %}
|
||||
</th>
|
||||
<th>
|
||||
|
|
|
@ -29,7 +29,7 @@ class Federation(View):
|
|||
sort = request.GET.get("sort")
|
||||
sort_fields = ["created_date", "application_type", "server_name"]
|
||||
if not sort in sort_fields + ["-{:s}".format(f) for f in sort_fields]:
|
||||
sort = "created_date"
|
||||
sort = "-created_date"
|
||||
servers = servers.order_by(sort)
|
||||
|
||||
paginated = Paginator(servers, PAGE_LENGTH)
|
||||
|
|
Loading…
Reference in a new issue