mirror of
https://github.com/ae-utbm/sith.git
synced 2025-07-11 04:19:25 +00:00
Display results only when the polls close
This commit is contained in:
@ -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()
|
||||
|
Reference in New Issue
Block a user