Display previous stages on attribution view
This commit is contained in:
parent
93b84289fe
commit
26452f9068
6 changed files with 35 additions and 4 deletions
|
|
@ -15,6 +15,12 @@ class StudentSummaryView(DetailView):
|
|||
model = Student
|
||||
template_name = 'student_summary.html'
|
||||
|
||||
def get_context_data(self, **kwargs):
|
||||
context = super(StudentSummaryView, self).get_context_data(**kwargs)
|
||||
context['previous_stages'] = self.object.training_set.all(
|
||||
).select_related('availability__corporation').order_by('availability__period__end_date')
|
||||
return context
|
||||
|
||||
|
||||
class AvailabilitySummaryView(DetailView):
|
||||
model = Availability
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue