mirror of
https://github.com/ae-utbm/sith.git
synced 2024-11-22 06:03:20 +00:00
Remove useless methods on elections
This commit is contained in:
parent
1f60fbd484
commit
a27fd267d7
@ -36,12 +36,6 @@ class Election(models.Model):
|
|||||||
now = timezone.now()
|
now = timezone.now()
|
||||||
return bool(now <= self.end_candidature and now >= self.start_candidature)
|
return bool(now <= self.end_candidature and now >= self.start_candidature)
|
||||||
|
|
||||||
def get_results(self):
|
|
||||||
pass
|
|
||||||
|
|
||||||
def has_voted(self, user):
|
|
||||||
return False
|
|
||||||
|
|
||||||
# Permissions
|
# Permissions
|
||||||
|
|
||||||
|
|
||||||
|
@ -169,12 +169,12 @@ th {
|
|||||||
{% trans %}Polls close {% endtrans %}
|
{% trans %}Polls close {% endtrans %}
|
||||||
<time datetime="{{ election.end_date }}">{{ election.end_date|date("l d F Y") }}</time> at <time>{{ election.end_date|time("G:i") }}</time>
|
<time datetime="{{ election.end_date }}">{{ election.end_date|date("l d F Y") }}</time> at <time>{{ election.end_date|time("G:i") }}</time>
|
||||||
</p>
|
</p>
|
||||||
{%- if object.has_voted(request.user) %}
|
{# {%- if object.has_voted(request.user) %}
|
||||||
<p class="election__elector-infos">
|
<p class="election__elector-infos">
|
||||||
<span>{% trans %}You already have submitted your vote.{% endtrans %}</span>
|
<span>{% trans %}You already have submitted your vote.{% endtrans %}</span>
|
||||||
</p>
|
</p>
|
||||||
{%- endif %}
|
{%- endif %}
|
||||||
</section>
|
#} </section>
|
||||||
<section>
|
<section>
|
||||||
<table>
|
<table>
|
||||||
{%- set election_lists = object.election_list.all() -%}
|
{%- set election_lists = object.election_list.all() -%}
|
||||||
|
Loading…
Reference in New Issue
Block a user