Opened 17 years ago
Closed 17 years ago
#8773 closed (invalid)
Context processors must be in context_processors.py
| Reported by: | Scot Hacker | 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: | no | UI/UX: | no |
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
Note:
See TracTickets
for help on using tickets.
There is no restriction on module names for
TEMPLATE_CONTEXT_PROCESSORS.