context_processors.py 339 B

12345678910111213
  1. from django.conf import settings as django_settings
  2. from extras.registry import registry
  3. def settings_and_registry(request):
  4. """
  5. Expose Django settings and NetBox registry stores in the template context. Example: {{ settings.DEBUG }}
  6. """
  7. return {
  8. 'settings': django_settings,
  9. 'registry': registry,
  10. }