From a27fd267d7bc9dc190e6fc5e45d8039535b2c38a Mon Sep 17 00:00:00 2001 From: klmp200 Date: Thu, 22 Dec 2016 01:31:40 +0100 Subject: [PATCH] Remove useless methods on elections --- election/models.py | 6 ------ election/templates/election/election_detail.jinja | 4 ++-- 2 files changed, 2 insertions(+), 8 deletions(-) diff --git a/election/models.py b/election/models.py index e042bba5..b6217403 100644 --- a/election/models.py +++ b/election/models.py @@ -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 diff --git a/election/templates/election/election_detail.jinja b/election/templates/election/election_detail.jinja index a7c14050..f43e8a5c 100644 --- a/election/templates/election/election_detail.jinja +++ b/election/templates/election/election_detail.jinja @@ -169,12 +169,12 @@ th { {% trans %}Polls close {% endtrans %} at

- {%- if object.has_voted(request.user) %} +{# {%- if object.has_voted(request.user) %}

{% trans %}You already have submitted your vote.{% endtrans %}

{%- endif %} - + #}
{%- set election_lists = object.election_list.all() -%}