Commit 789a496f authored by Thom Wiggers's avatar Thom Wiggers 📐
Browse files

Merge branch 'sort_documents' into 'master'

Sort association documents by name

Closes #700

See merge request !1016
parents e646508d 42e79ced
......@@ -6,6 +6,7 @@ from django.http import Http404
from django.shortcuts import get_object_or_404, redirect, render
from django.utils import timezone
from django.utils.text import slugify
from django.utils.translation import get_language
from sendfile import sendfile
from documents.models import (AnnualDocument, AssociationDocument,
......@@ -45,7 +46,11 @@ def index(request):
years[meeting_year]['general_meetings'].append(obj)
return render(request, 'documents/index.html', {
'association_documents': AssociationDocument.objects.all(),
'association_documents':
AssociationDocument
.objects
.order_by(f'name_{ get_language() }')
.all(),
'years': list(years.items())
})
......
Supports Markdown
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment