On rajoute la personne ayant créé l'élection
This commit is contained in:
parent
325014aeef
commit
d3e3ff23ce
2 changed files with 6 additions and 0 deletions
|
@ -59,6 +59,11 @@
|
||||||
</span>
|
</span>
|
||||||
<span class="tag is-medium is-primary">{{ election.end_date|date:"d/m/Y H:i" }}</span>
|
<span class="tag is-medium is-primary">{{ election.end_date|date:"d/m/Y H:i" }}</span>
|
||||||
</div>
|
</div>
|
||||||
|
|
||||||
|
{# Créateurice de l'élection #}
|
||||||
|
<div class="level-item">
|
||||||
|
<span class="tag is-primary is-light is-outlined">{% blocktrans with creator=election.created_by.full_name %}Créé par {{ creator }}{% endblocktrans %}</span>
|
||||||
|
</div>
|
||||||
</div>
|
</div>
|
||||||
|
|
||||||
{# Confirmation de vote #}
|
{# Confirmation de vote #}
|
||||||
|
|
|
@ -418,6 +418,7 @@ class ElectionView(NotArchivedMixin, DetailView):
|
||||||
return (
|
return (
|
||||||
super()
|
super()
|
||||||
.get_queryset()
|
.get_queryset()
|
||||||
|
.select_related("created_by")
|
||||||
.prefetch_related("questions__options", "questions__duels")
|
.prefetch_related("questions__options", "questions__duels")
|
||||||
)
|
)
|
||||||
|
|
||||||
|
|
Loading…
Reference in a new issue