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()
return bool(now <= self.end_candidature and now >= self.start_candidature)
def get_results(self):
pass
def has_voted(self, user):
return False
# Permissions

View File

@ -169,12 +169,12 @@ th {
{% 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>
</p>
{%- if object.has_voted(request.user) %}
{# {%- if object.has_voted(request.user) %}
<p class="election__elector-infos">
<span>{% trans %}You already have submitted your vote.{% endtrans %}</span>
</p>
{%- endif %}
</section>
#} </section>
<section>
<table>
{%- set election_lists = object.election_list.all() -%}