2022-11-16 16:23:46 -08:00
|
|
|
from core.models import Config
|
2022-11-05 13:17:27 -07:00
|
|
|
|
|
|
|
|
|
|
|
def config_context(request):
|
2022-11-06 12:48:04 -08:00
|
|
|
return {
|
2022-11-17 18:16:34 -08:00
|
|
|
"config": Config.system,
|
2022-11-16 16:23:46 -08:00
|
|
|
"config_identity": (
|
2022-11-25 18:33:46 -08:00
|
|
|
request.identity.config_identity if request.identity else None
|
2022-11-16 16:23:46 -08:00
|
|
|
),
|
2022-11-16 20:42:25 -08:00
|
|
|
"top_section": request.path.strip("/").split("/")[0],
|
2022-11-06 12:48:04 -08:00
|
|
|
}
|