Code

Opened 6 years ago

Closed 2 years ago

#6851 closed Uncategorized (invalid)

Documentation erroneously states TEMPLATE_CONTEXT_PROCESSORS are set

Reported by: roderikk@… Owned by: nobody
Component: Documentation Version: master
Severity: Normal 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

Creating a new project with SVN HEAD does not set the TEMPLATE_CONTEXT_PROCESSORS in the settings.py file.

Don't know whether this is a bug or a feature.

Seen here:
http://www.djangoproject.com/documentation/templates_python/#subclassing-context-requestcontext
http://www.djangoproject.com/documentation/settings/#template-context-processors

Attachments (0)

Change History (3)

comment:1 Changed 6 years ago by mtredinnick

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

The documentation says that TEMPLATE_CONTEXT_PROCESSORS is a setting, which is correct. It doesn't say that the setting will necessarily be part of your project's settings file.

Settings are a combination of Django's global settings and your particular settings file (which may or may not be settings.py).

comment:2 Changed 2 years ago by anonymous

  • Easy pickings unset
  • Resolution invalid deleted
  • Severity set to Normal
  • Status changed from closed to reopened
  • Type set to Uncategorized
  • UI/UX unset

The documentation does state that there is a non-empty default value for this setting:

("django.contrib.auth.context_processors.auth",
"django.core.context_processors.debug",
"django.core.context_processors.i18n",
"django.core.context_processors.media",
"django.core.context_processors.static",
"django.contrib.messages.context_processors.messages")

Here:

https://docs.djangoproject.com/en/1.3/ref/templates/api/#subclassing-context-requestcontext

and here:

https://docs.djangoproject.com/en/1.3/ref/settings/#template-context-processors

Isn't this wrong? I don't see any context processors in my settings.py files.

comment:3 Changed 2 years ago by carljm

  • Resolution set to invalid
  • Status changed from reopened to closed

All of the built-in settings have global defaults, which are the effective value of the setting if the setting doesn't appear in your own settings file. TEMPLATE_CONTEXT_PROCESSORS does have the default value that it is documented to have, if that value isn't overridden in your own settings file.

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.