Remove useless methods on elections

This commit is contained in:
Antoine Bartuccio 2016-12-22 01:31:40 +01:00
parent 1f60fbd484
commit a27fd267d7
2 changed files with 2 additions and 8 deletions

View File

@ -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

View File

@ -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() -%}