hide registration if event is over

pull/1/head
parent cad8945e25
commit 06c3a39bde

@ -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"])

Loading…
Cancel
Save