Improve WEI UI
This commit is contained in:
parent
d7da876a23
commit
0c9409fd4b
8 changed files with 105 additions and 22 deletions
|
|
@ -27,6 +27,10 @@ class WEIClub(Club):
|
|||
verbose_name=_("date end"),
|
||||
)
|
||||
|
||||
@property
|
||||
def is_current_wei(self):
|
||||
return not WEIClub.objects.filter(date_start__gt=self.date_start).exists()
|
||||
|
||||
def update_membership_dates(self):
|
||||
"""
|
||||
We can't join the WEI next years.
|
||||
|
|
@ -216,6 +220,13 @@ class WEIRegistration(models.Model):
|
|||
"""
|
||||
self.information_json = json.dumps(information)
|
||||
|
||||
@property
|
||||
def is_validated(self):
|
||||
try:
|
||||
return self.membership is not None
|
||||
except KeyError:
|
||||
return False
|
||||
|
||||
def __str__(self):
|
||||
return str(self.user)
|
||||
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue