mirror of
https://github.com/ae-utbm/sith.git
synced 2025-07-11 04:19:25 +00:00
Finished main view. Some tuning are to be done.
This commit is contained in:
@ -36,6 +36,9 @@ class Election(models.Model):
|
||||
now = timezone.now()
|
||||
return bool(now <= self.end_candidature and now >= self.start_candidature)
|
||||
|
||||
def has_voted(self, user):
|
||||
return hasattr(user, 'has_voted') and user.has_voted.all() == list(self.role.all())
|
||||
|
||||
# Permissions
|
||||
|
||||
|
||||
|
Reference in New Issue
Block a user