Code

Opened 3 years ago

Closed 3 years ago

Last modified 3 years ago

#14600 closed (fixed)

No mentioning of addition of staticfiles to TEMPLATE_CONTEXT_PROCESSORS after 1.2 in settings documentation

Reported by: mathijs@… Owned by: nobody
Component: Documentation Version: master
Severity: Keywords: staticfiles context_processors documentation template_context_processors media
Cc: gremmie Triage Stage: Accepted
Has patch: no Needs documentation: no
Needs tests: no Patch needs improvement: no
Easy pickings: UI/UX:

Description

In the devs docs, the list of TEMPLATE_CONTEXT_PROCESSORS is:

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

In the 1.2 docs, it reads:

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

Since "django.core.context_processors.media" changed for "django.contrib.staticfiles.context_processors.staticfiles" it should mention something about this in the docs. This way it's confusing for innocent users like myself.

A suggested change would be:

Changed in Django 1.3: "django.core.context_processors.media" was replaced by ""django.contrib.staticfiles.context_processors.staticfiles" in the default. For more information, see the staticfiles documentation.

Attachments (0)

Change History (4)

comment:1 Changed 3 years ago by gabrielhurley

  • Needs documentation unset
  • Needs tests unset
  • Patch needs improvement unset
  • Triage Stage changed from Unreviewed to Accepted

comment:2 Changed 3 years ago by gremmie

  • Cc gremmie added

There is also no mention that the new staticfiles context processor also puts MEDIA_URL in the context here. It is mentioned here, however there is a typo "This context processor has been moved to the new The staticfiles app app".

There is a typo here: "see the statcfiles reference."

comment:3 Changed 3 years ago by gabrielhurley

  • Resolution set to fixed
  • Status changed from new to closed

(In [14479]) Fixed #14600 -- Added a versionchanged directive to the TEMPLATE_CONTEXT_PROCESSORS setting reference, and added a currentmodule directive to the staticfiles docs so that the crossref targets would point to the right place even with full paths in the staticfiles docs. Thanks to mathijs for the report and suggested text.

comment:4 Changed 3 years ago by jacob

  • milestone 1.3 deleted

Milestone 1.3 deleted

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.