add messages and debug links
parent
7d2426cc2c
commit
14e18e9f2e
@ -0,0 +1,12 @@
|
||||
from django.conf import settings
|
||||
from .models import LoginToken
|
||||
|
||||
# enhance template contexts with frequently used data so we have less code duplication
|
||||
def proc(request):
|
||||
context = {
|
||||
"DEBUG": settings.DEBUG,
|
||||
}
|
||||
tk = LoginToken.objects.filter(pk=request.session.get("token")).first()
|
||||
if tk:
|
||||
context["helper"] = tk.helper
|
||||
return context
|
Loading…
Reference in New Issue