Opened 3 years ago

Closed 3 years ago

Last modified 3 years ago

#21768 closed Bug (fixed)

TemplateView doc describes context incorrectly

Reported by: Ned Batchelder Owned by: nobody
Component: Documentation Version: 1.6
Severity: Normal Keywords:
Cc: Triage Stage: Accepted
Has patch: yes Needs documentation: no
Needs tests: no Patch needs improvement: no
Easy pickings: yes UI/UX: no

Description

Here: https://docs.djangoproject.com/en/1.6/ref/class-based-views/base/#templateview

The bottom of that section says:

Context

params: The dictionary of keyword arguments captured from the URL pattern that served the view.

but the top says:

Changed in Django 1.5:

The context used to be populated with a {{ params }} dictionary of the
parameters captured in the URL. Now those parameters are first-level context variables.

Change History (5)

comment:1 Changed 3 years ago by Claude Paroz

Has patch: set
Needs documentation: unset
Needs tests: unset
Patch needs improvement: unset

Would that change make sense?

-    * ``params``: The dictionary of keyword arguments captured from the URL
-      pattern that served the view.
+    * Populated with keyword arguments captured from the URL pattern that
+      served the view (through :class:`django.views.generic.base.ContextMixin`).

comment:2 Changed 3 years ago by Claude Paroz

Triage Stage: UnreviewedAccepted

comment:3 Changed 3 years ago by Tim Graham <timograham@…>

Resolution: fixed
Status: newclosed

In c05b2f58e7f38293fdf0f92e618fcbe769881912:

Fixed #21768 -- Corrected TemplateView context section.

Thanks nedbatchelder for the report and claudep for the patch.

comment:4 Changed 3 years ago by Tim Graham <timograham@…>

In b83dae688e7cd6775bf6d12c7fe5a7a5f40e7437:

[1.5.x] Fixed #21768 -- Corrected TemplateView context section.

Thanks nedbatchelder for the report and claudep for the patch.

Backport of c05b2f58e7 from master

comment:5 Changed 3 years ago by Tim Graham <timograham@…>

In 363b8c690a992f78f40137e0ff406cb3167653d6:

[1.6.x] Fixed #21768 -- Corrected TemplateView context section.

Thanks nedbatchelder for the report and claudep for the patch.

Backport of c05b2f58e7 from master

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