Display results only when the polls close

This commit is contained in:
Jean-Baptiste Lenglet authored and klmp200 committed 2016-12-25 19:54:10 +01:00
1 parent 1c761f9db2
commit 64f5fef89f
3 files changed
+21 -12

No files matched your search

+4
View File
@@ -31,6 +31,10 @@ class Election(models.Model):
now = timezone.now()
return bool(now <= self.end_date and now >= self.start_date)
@property
def is_vote_finished(self):
return bool(timezone.now() > self.end_date)
@property
def is_candidature_active(self):
now = timezone.now()