Skip to content

Commit

Permalink
Change le tri par défaut sur les listes de publications par auteur
Browse files Browse the repository at this point in the history
  • Loading branch information
Arnaud-D committed Oct 8, 2023
1 parent 0efc692 commit b6b7368
Show file tree
Hide file tree
Showing 2 changed files with 2 additions and 2 deletions.
2 changes: 1 addition & 1 deletion zds/tutorialv2/urls/urls_opinions.py
Original file line number Diff line number Diff line change
Expand Up @@ -21,7 +21,7 @@
path("", ListOpinions.as_view(), name="list"),
path(
"voir/<str:username>/",
ContentOfAuthor.as_view(type="OPINION", context_object_name="opinions", sort="creation"),
ContentOfAuthor.as_view(type="OPINION", context_object_name="opinions"),
name="find-opinion",
),
]
2 changes: 1 addition & 1 deletion zds/tutorialv2/views/lists.py
Original file line number Diff line number Diff line change
Expand Up @@ -395,7 +395,7 @@ def get_queryset(self):
if "sort" in self.request.GET and self.request.GET["sort"].lower() in self.sorts:
self.sort = self.request.GET["sort"]
elif not self.sort:
self.sort = "abc"
self.sort = "modification"
queryset = self.sorts[self.sort.lower()][0](queryset)

return queryset
Expand Down

0 comments on commit b6b7368

Please sign in to comment.