mirror of
https://github.com/nottinghamtec/PyRIGS.git
synced 2026-01-18 22:12:14 +00:00
Much template wrangling
This commit is contained in:
@@ -5,6 +5,7 @@ from django.views import generic
|
||||
from django.views.decorators.csrf import csrf_exempt
|
||||
|
||||
from RIGS import models
|
||||
from training.models import Trainee
|
||||
|
||||
|
||||
# This view should be exempt from requiring CSRF token.
|
||||
@@ -42,6 +43,7 @@ class ProfileDetail(generic.DetailView):
|
||||
def get_context_data(self, **kwargs):
|
||||
context = super(ProfileDetail, self).get_context_data(**kwargs)
|
||||
context['page_title'] = "Profile: {}".format(self.object)
|
||||
context["completed_levels"] = Trainee.objects.get(pk=self.object.pk).level_qualifications()
|
||||
return context
|
||||
|
||||
|
||||
|
||||
Reference in New Issue
Block a user