Opened 3 years ago

Closed 3 years ago

Last modified 3 years ago

#19714 closed Bug (fixed)

Documentation for TemplateView incorrectly refers to "params" context variable.

Reported by: Aramgutang Owned by: claudep
Component: Documentation Version: 1.5-beta-1
Severity: Release blocker Keywords: TemplateView params
Cc: Triage Stage: Accepted
Has patch: no Needs documentation: no
Needs tests: no Patch needs improvement: no
Easy pickings: yes UI/UX: no

Description

The documentation for TemplateView at docs/ref/class-based-views/base.txt states that TemplateView provides a "params" context variable, which is a dictionary of the URL matched groups. However, since commit f04bb6d, TemplateView no longer creates a "params" variable, instead passing the matched groups directly, e.g. for the URL pattern r'/(?<slug>[^\]+/', the template receives {{ email }} instead of {{ params.email }}, as suggested by the documentation.

Change History (5)

comment:1 Changed 3 years ago by Aramgutang

  • Needs documentation unset
  • Needs tests unset
  • Patch needs improvement unset
  • Severity changed from Normal to Release blocker

comment:2 Changed 3 years ago by claudep

  • Owner changed from nobody to claudep
  • Status changed from new to assigned
  • Triage Stage changed from Unreviewed to Accepted

comment:3 Changed 3 years ago by Claude Paroz <claude@…>

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

In 56e553129f554f83c8e99ef3368544921dbd8a82:

Fixed #19714 -- Updated documentation about TemplateView context

Thanks Aramgutang for the report. Refs #17228.

comment:4 Changed 3 years ago by Claude Paroz <claude@…>

In 5ebd0452ba6ff93980e6f9a8958f6ea01c835ffe:

[1.5.x] Fixed #19714 -- Updated documentation about TemplateView context

Thanks Aramgutang for the report. Refs #17228.
Backport of 56e553129 from master.

comment:5 Changed 3 years ago by Claude Paroz <claude@…>

In 5ebd0452ba6ff93980e6f9a8958f6ea01c835ffe:

[1.5.x] Fixed #19714 -- Updated documentation about TemplateView context

Thanks Aramgutang for the report. Refs #17228.
Backport of 56e553129 from master.

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