You cannot select more than 25 topics
Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.
13 lines
370 B
Python
13 lines
370 B
Python
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
|