Fewer requests on petit cours details management.

This commit is contained in:
Aurélien Delobelle 2017-04-09 17:57:11 +02:00
parent 3dc91e30bd
commit 6ce2f178bf

View file

@ -35,6 +35,11 @@ class DemandeListView(ListView):
class DemandeDetailView(DetailView):
model = PetitCoursDemande
queryset = (
PetitCoursDemande.objects
.prefetch_related('petitcoursattribution_set',
'matieres')
)
template_name = "gestioncof/details_demande_petit_cours.html"
context_object_name = "demande"