2022-11-17 00:23:46 +00:00
|
|
|
from core.models import Config
|
2022-11-05 20:17:27 +00:00
|
|
|
|
|
|
|
|
|
|
|
def config_context(request):
|
2022-11-06 20:48:04 +00:00
|
|
|
return {
|
2022-11-18 02:16:34 +00:00
|
|
|
"config": Config.system,
|
2022-11-17 00:23:46 +00:00
|
|
|
"config_identity": (
|
2022-11-26 02:33:46 +00:00
|
|
|
request.identity.config_identity if request.identity else None
|
2022-11-17 00:23:46 +00:00
|
|
|
),
|
2022-11-17 04:42:25 +00:00
|
|
|
"top_section": request.path.strip("/").split("/")[0],
|
2022-12-26 17:39:33 +00:00
|
|
|
"opengraph_defaults": {
|
|
|
|
"og:site_name": Config.system.site_name,
|
|
|
|
"og:type": "website",
|
|
|
|
"og:title": Config.system.site_name,
|
|
|
|
"og:url": request.build_absolute_uri(),
|
|
|
|
},
|
2022-11-06 20:48:04 +00:00
|
|
|
}
|