Code

Opened 6 years ago

Closed 6 years ago

#8773 closed (invalid)

Context processors must be in context_processors.py

Reported by: shacker Owned by: nobody
Component: Documentation Version: 1.0-alpha-2
Severity: Keywords:
Cc: Triage Stage: Unreviewed
Has patch: no Needs documentation: no
Needs tests: no Patch needs improvement: no
Easy pickings: UI/UX:

Description

Documentation does not specify in which file to create context processor functions. They must be defined in context_processors.py , not in views.py. Otherwise the TEMPLATE_CONTEXT_PROCESSORS setting will fail to recognize them as context processors. This apparent requirement should be documented at:

http://www.djangoproject.com/documentation/templates_python/#subclassing-context-requestcontext

Attachments (0)

Change History (1)

comment:1 Changed 6 years ago by Daniel Pope <dan@…>

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

There is no restriction on module names for TEMPLATE_CONTEXT_PROCESSORS.

Add Comment

Modify Ticket

Change Properties
<Author field>
Action
as closed
as The resolution will be set. Next status will be 'closed'
The resolution will be deleted. Next status will be 'new'
Author


E-mail address and user name can be saved in the Preferences.

 
Note: See TracTickets for help on using tickets.