File: processors.py

package info (click to toggle)
django-dynamic-preferences 1.17.0-1
  • links: PTS, VCS
  • area: main
  • in suites: forky, sid, trixie
  • size: 476 kB
  • sloc: python: 3,040; makefile: 3
file content (10 lines) | stat: -rw-r--r-- 323 bytes parent folder | download
1
2
3
4
5
6
7
8
9
10
from .registries import global_preferences_registry as gpr


def global_preferences(request):
    """
    Pass the values of global preferences to template context.
    You can then access value with `global_preferences.<section>.<name>`
    """
    manager = gpr.manager()
    return {"global_preferences": manager.all()}