add event state dependent messages and screens
parent
0863b8c45a
commit
cad8945e25
@ -0,0 +1,16 @@
|
||||
from django.shortcuts import render
|
||||
from dynamic_preferences.registries import global_preferences_registry
|
||||
|
||||
|
||||
def event_state(view):
|
||||
global_preferences = global_preferences_registry.manager()
|
||||
|
||||
def wrapped(request, *args, **kwargs):
|
||||
state = global_preferences["helper__event_state"]
|
||||
if state == "RUNNING":
|
||||
return view(request, *args, **kwargs)
|
||||
if state == "BEFORE":
|
||||
return render(request, "event_before.html", {})
|
||||
return render(request, "event_after.html", {})
|
||||
|
||||
return wrapped
|
@ -0,0 +1,7 @@
|
||||
{% extends "helper_base.html" %}
|
||||
|
||||
{% block title %}Danke!{% endblock %}
|
||||
{% block content %}
|
||||
Das wars!<br/>
|
||||
Danke für Deine Hilfe, bis zum nächsten Event.
|
||||
{% endblock %}
|
@ -0,0 +1,7 @@
|
||||
{% extends "helper_base.html" %}
|
||||
|
||||
{% block title %}Stay Tuned!{% endblock %}
|
||||
{% block content %}
|
||||
Bald gehts los!<br/>
|
||||
Wir schicken Dir eine SMS wenn wir freie Schichten haben.
|
||||
{% endblock %}
|
Loading…
Reference in New Issue