This commit is contained in:
9
app/core/utils.py
Normal file
9
app/core/utils.py
Normal file
@@ -0,0 +1,9 @@
|
||||
from app.core.config import settings
|
||||
from datetime import datetime
|
||||
|
||||
|
||||
def is_registration_open():
|
||||
now = datetime.now(tz=settings.TZ)
|
||||
not_before = now >= settings.NOT_BEFORE
|
||||
not_after = now <= settings.NOT_AFTER
|
||||
return not_before and not_after, not_before, not_after
|
||||
Reference in New Issue
Block a user