Edit TEMPLATE_CONTEXT_PROCESSORS in your settings.py

/ Published in: Django
Save to your folder(s)

Instead of directly edit your TEMPLATE\_CONTEXT\_PROCESSORS, import it in your app's settings.py and just append what you need.

(credits: denysonique and all #django channel community)

Copy this code and paste it in your HTML
  1. from django.conf.global_settings import TEMPLATE_CONTEXT_PROCESSORS
  3. TEMPLATE_CONTEXT_PROCESSORS += ('your.context.preprocessors')

Report this snippet


RSS Icon Subscribe to comments

You need to login to post a comment.