Order galleries by start date on tag detail pages
This commit is contained in:
parent
d95f29c870
commit
036cca0f59
1 changed files with 2 additions and 1 deletions
|
|
@ -23,7 +23,8 @@ class TagDetail(LoginRequiredMixin, DetailView):
|
||||||
current_tag = self.get_object().slug
|
current_tag = self.get_object().slug
|
||||||
context = super().get_context_data(**kwargs)
|
context = super().get_context_data(**kwargs)
|
||||||
context['galleries'] = Gallery.objects.on_site().is_public() \
|
context['galleries'] = Gallery.objects.on_site().is_public() \
|
||||||
.filter(extended__tags__slug=current_tag)
|
.filter(extended__tags__slug=current_tag) \
|
||||||
|
.order_by('-extended__date_start')
|
||||||
return context
|
return context
|
||||||
|
|
||||||
|
|
||||||
|
|
|
||||||
Loading…
Add table
Add a link
Reference in a new issue