startpage: sort groups by name

pull/73/head
Christian Merten 1 year ago
parent 7bb89dd2d9
commit 3453359e1e
Signed by: christian.merten
GPG Key ID: D953D69721B948B3

@ -11,7 +11,7 @@ from .models import Post, Section
# render shortcut adding additional context variables, needed for navbar # render shortcut adding additional context variables, needed for navbar
def render(request, template_path, context={}): def render(request, template_path, context={}):
context['groups'] = Group.objects.filter(show_website=True) context['groups'] = Group.objects.filter(show_website=True).order_by('name')
context['sections'] = Section.objects.all() context['sections'] = Section.objects.all()
try: try:
context['root_section'] = Section.objects.get(urlname=settings.ROOT_SECTION) context['root_section'] = Section.objects.get(urlname=settings.ROOT_SECTION)

Loading…
Cancel
Save