summaryrefslogtreecommitdiffstats
path: root/core/context.py
blob: a4aabf53124a2731cf43f822e0c5ee9ea554b1eb (plain)
1
2
3
4
5
6
7
8
9
10
11
from core.models import Config


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],
    }