This repository has been archived on 2023-09-24. You can view files and clone it, but cannot push or open issues or pull requests.
takahe/core/context.py

12 lines
304 B
Python
Raw Normal View History

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