Some serialization BS
This commit is contained in:
@@ -108,6 +108,11 @@ class SignupForm(models.Model):
|
||||
def signups(self):
|
||||
return Signup.objects.filter(signupForm=self).order_by('pk')
|
||||
|
||||
@property
|
||||
def isOpen(self):
|
||||
now = timezone.now()
|
||||
return self.start_time <= now and now < self.end_time
|
||||
|
||||
class Meta:
|
||||
verbose_name = _('Signup form')
|
||||
verbose_name_plural = _('Signup forms')
|
||||
|
||||
Reference in New Issue
Block a user