|
|
@ -9,6 +9,9 @@ from django.conf import settings
|
|
|
|
from django.contrib import messages
|
|
|
|
from django.contrib import messages
|
|
|
|
import datetime
|
|
|
|
import datetime
|
|
|
|
from .decorators import event_state
|
|
|
|
from .decorators import event_state
|
|
|
|
|
|
|
|
from dynamic_preferences.registries import global_preferences_registry
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
global_preferences = global_preferences_registry.manager()
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
@event_state
|
|
|
|
@event_state
|
|
|
@ -86,7 +89,9 @@ def logout(request):
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
def register(request):
|
|
|
|
def register(request):
|
|
|
|
# handle number already being registered(resend message?)
|
|
|
|
if global_preferences["helper__event_state"] == "AFTER":
|
|
|
|
|
|
|
|
return render(request, "event_after.html", {})
|
|
|
|
|
|
|
|
|
|
|
|
if request.helper:
|
|
|
|
if request.helper:
|
|
|
|
if request.session.get("last_seen_shift"):
|
|
|
|
if request.session.get("last_seen_shift"):
|
|
|
|
return redirect("shift", shiftid=request.session["last_seen_shift"])
|
|
|
|
return redirect("shift", shiftid=request.session["last_seen_shift"])
|
|
|
|