using context_object_name and moving template
This commit is contained in:
parent
45eb384cfd
commit
ed01508481
2 changed files with 10 additions and 9 deletions
|
@ -34,11 +34,12 @@ class DemandeListView(ListView):
|
|||
|
||||
class DemandeDetailView(DetailView):
|
||||
model = PetitCoursDemande
|
||||
template_name = "details_demande_petit_cours.html"
|
||||
template_name = "gestioncof/details_demande_petit_cours.html"
|
||||
context_object_name = "demande"
|
||||
|
||||
def get_context_data(self, **kwargs):
|
||||
context = super(DemandeDetailView, self).get_context_data(**kwargs)
|
||||
obj = context['object']
|
||||
obj = self.object
|
||||
context['attributions'] = obj.petitcoursattribution_set.all()
|
||||
return context
|
||||
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue