Fancy training level list layout

This commit is contained in:
2021-09-12 18:08:13 +01:00
parent cddb76bf7e
commit 13b1cea28b
4 changed files with 45 additions and 9 deletions

View File

@@ -61,7 +61,7 @@ class LevelList(generic.ListView):
def get_context_data(self, **kwargs):
context = super().get_context_data(**kwargs)
context["page_title"] = "All Training Levels"
context["levels"] = models.TrainingLevel.objects.all()
context["levels"] = models.TrainingLevel.objects.all().order_by('level','department')
return context