Refactor is_supervisor

This commit is contained in:
2021-09-13 00:49:02 +01:00
parent 06c6b9a36e
commit 75410db752
3 changed files with 16 additions and 11 deletions

View File

@@ -29,6 +29,7 @@ class TraineeDetail(views.ProfileDetail, ModalURLMixin):
context = super(TraineeDetail, self).get_context_data(**kwargs)
context["page_title"] = "{}'s Training Record".format(self.object.first_name + " " + self.object.last_name)
# TODO Filter this to levels the user has
# context["completed_levels"] =
context["levels"] = models.TrainingLevel.objects.all()
context["categories"] = models.TrainingCategory.objects.all().prefetch_related('items')
choices = models.TrainingItemQualification.CHOICES