takahe/core/context.py

12 lines
297 B
Python
Raw Normal View History

from core.models import Config
2022-11-05 20:17:27 +00:00
def config_context(request):
return {
2022-11-18 02:16:34 +00:00
"config": Config.system,
"config_identity": (
Config.load_identity(request.identity) if request.identity else None
),
"top_section": request.path.strip("/").split("/")[0],
}