def available(self): if not self.reg_conf.enabled or not self.status: return False if hasattr(self, 'event'): if localize_date(datetime.now()) > localize_date(self.event.end_dt, from_tz=self.timezone): return False return True
def within_time(self): if localize_date(self.start_dt, from_tz=self.timezone) \ <= localize_date(datetime.now()) \ <= localize_date(self.end_dt, from_tz=self.timezone): return True return False
def registration_has_ended(self): if localize_date(datetime.now()) >= localize_date(self.end_dt, from_tz=self.timezone): return True return False