Opened 6 years ago

Closed 6 years ago

#13338 closed (invalid)

adding custom template context processor(s) to screws up admin

Reported by: marshall.ent@… Owned by: nobody
Component: Template system Version: 1.1
Severity: Keywords: template context processor
Cc: Triage Stage: Unreviewed
Has patch: no Needs documentation: no
Needs tests: no Patch needs improvement: no
Easy pickings: UI/UX:


I added my own template context processor:


and the admin system stopped receiving its context and I got TemplateSyntaxErrors. It worked again when I added:


is there a reason I have to manually add the context processor for auth after creating a custom processor? A user in #django told me to add the following:

from django.conf.global_settings import TEMPLATE_CONTEXT_PROCESSORS

to the top of my, I did that and added my template context processor using:


which seems to have worked. What's going on? Is this the way it's supposed to be or have I done something I'm not supposed to?

Change History (1)

comment:1 Changed 6 years ago by Alex

  • Needs documentation unset
  • Needs tests unset
  • Patch needs improvement unset
  • Resolution set to invalid
  • Status changed from new to closed

Trac is not for asking support questions, please use #django or the django-users mailing list. For the record this isn't a bug, when you set TEMPLATE_CONTEXT_PROCESSORS you aren't adding to the defaults, you're overiding them, so you need to add the defaults in.

Note: See TracTickets for help on using tickets.
Back to Top