diff options
| author | Mariusz Felisiak <felisiak.mariusz@gmail.com> | 2020-08-24 09:00:12 +0200 |
|---|---|---|
| committer | Mariusz Felisiak <felisiak.mariusz@gmail.com> | 2020-08-24 11:39:05 +0200 |
| commit | e81aa7a94addf1f5380960fe89a49d104889c96d (patch) | |
| tree | a8c3d18fce9950000ff3fe93c1cc9fc9a51de7f6 /docs | |
| parent | f247c66bb5f95541d16143ef37452bb1dfeacc3e (diff) | |
[3.1.x] Fixed #31877 -- Reverted "Fixed #19878 -- Deprecated TemplateView passing URL kwargs into context."
This reverts commit 4ed534758cb6a11df9f49baddecca5a6cdda9311.
Backport of bb8f66934d93faf80cd1a2dda65aaedce21a6fc5 from master
Diffstat (limited to 'docs')
| -rw-r--r-- | docs/internals/deprecation.txt | 3 | ||||
| -rw-r--r-- | docs/ref/class-based-views/base.txt | 12 | ||||
| -rw-r--r-- | docs/releases/3.1.1.txt | 4 | ||||
| -rw-r--r-- | docs/releases/3.1.txt | 4 |
4 files changed, 8 insertions, 15 deletions
diff --git a/docs/internals/deprecation.txt b/docs/internals/deprecation.txt index eddbcc3a1b..9926222d23 100644 --- a/docs/internals/deprecation.txt +++ b/docs/internals/deprecation.txt @@ -79,9 +79,6 @@ details on these changes. * The ``list`` message for ``ModelMultipleChoiceField`` will be removed. -* ``django.views.generic.TemplateView`` will no longer pass URL kwargs directly - to the ``context``. - * Support for passing raw column aliases to ``QuerySet.order_by()`` will be removed. diff --git a/docs/ref/class-based-views/base.txt b/docs/ref/class-based-views/base.txt index de45ae3a5e..7906c56846 100644 --- a/docs/ref/class-based-views/base.txt +++ b/docs/ref/class-based-views/base.txt @@ -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`` ================ diff --git a/docs/releases/3.1.1.txt b/docs/releases/3.1.1.txt index 0a0eeb461a..fd0843c2ae 100644 --- a/docs/releases/3.1.1.txt +++ b/docs/releases/3.1.1.txt @@ -31,3 +31,7 @@ Bugfixes * Fixed a regression in Django 3.1 that caused a crash when decoding an invalid session data (:ticket:`31895`). + +* Reverted a deprecation in Django 3.1 that caused a crash when passing + deprecated keyword arguments to a queryset in + ``TemplateView.get_context_data()`` (:ticket:`31877`). diff --git a/docs/releases/3.1.txt b/docs/releases/3.1.txt index 52e09b4d1d..a9ebe7b094 100644 --- a/docs/releases/3.1.txt +++ b/docs/releases/3.1.txt @@ -798,10 +798,6 @@ Miscellaneous * The ``list`` message for :class:`~django.forms.ModelMultipleChoiceField` is deprecated in favor of ``invalid_list``. -* The passing of URL kwargs directly to the context by - :class:`~django.views.generic.base.TemplateView` is deprecated. Reference - them in the template with ``view.kwargs`` instead. - * Passing raw column aliases to :meth:`.QuerySet.order_by` is deprecated. The same result can be achieved by passing aliases in a :class:`~django.db.models.expressions.RawSQL` instead beforehand. |
