mirror of
https://github.com/django/django.git
synced 2025-08-03 02:23:12 +00:00
[3.1.x] Fixed #31877 -- Reverted "Fixed #19878 -- Deprecated TemplateView passing URL kwargs into context."
This reverts commit4ed534758c
. Backport ofbb8f66934d
from master
This commit is contained in:
parent
f247c66bb5
commit
e81aa7a94a
7 changed files with 33 additions and 84 deletions
|
@ -117,7 +117,8 @@ MRO is an acronym for Method Resolution Order.
|
|||
|
||||
.. class:: django.views.generic.base.TemplateView
|
||||
|
||||
Renders a given template.
|
||||
Renders a given template, with the context containing parameters captured
|
||||
in the URL.
|
||||
|
||||
**Ancestors (MRO)**
|
||||
|
||||
|
@ -161,17 +162,12 @@ MRO is an acronym for Method Resolution Order.
|
|||
|
||||
**Context**
|
||||
|
||||
* Populated (through :class:`~django.views.generic.base.ContextMixin`).
|
||||
* Populated (through :class:`~django.views.generic.base.ContextMixin`) with
|
||||
the keyword arguments captured from the URL pattern that served the view.
|
||||
* You can also add context using the
|
||||
:attr:`~django.views.generic.base.ContextMixin.extra_context` keyword
|
||||
argument for :meth:`~django.views.generic.base.View.as_view`.
|
||||
|
||||
.. deprecated:: 3.1
|
||||
|
||||
Starting in Django 4.0, the keyword arguments captured from the URL
|
||||
pattern won't be passed to the context. Reference them with
|
||||
``view.kwargs`` instead.
|
||||
|
||||
``RedirectView``
|
||||
================
|
||||
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue