diff --git a/gestioncof/petits_cours_views.py b/gestioncof/petits_cours_views.py index 3228ccd1..503dcdb3 100644 --- a/gestioncof/petits_cours_views.py +++ b/gestioncof/petits_cours_views.py @@ -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 diff --git a/gestioncof/templates/details_demande_petit_cours.html b/gestioncof/templates/gestioncof/details_demande_petit_cours.html similarity index 70% rename from gestioncof/templates/details_demande_petit_cours.html rename to gestioncof/templates/gestioncof/details_demande_petit_cours.html index 1a0ed240..b51c0dc0 100644 --- a/gestioncof/templates/details_demande_petit_cours.html +++ b/gestioncof/templates/gestioncof/details_demande_petit_cours.html @@ -8,10 +8,10 @@ {% include "details_demande_petit_cours_infos.html" %}
- - {% if object.traitee %} - - + + {% if demande.traitee %} + + {% endif %}
Traitée
Traitée par {{ object.traitee_par }}
Traitée le {{ object.processed }}
Traitée
Traitée par {{ demande.traitee_par }}
Traitée le {{ demande.processed }}
Attributions
    @@ -23,15 +23,15 @@
- {% if object.traitee %} + {% if demande.traitee %}
-
+
{% else %}
-
+