mirror of
https://github.com/django/django.git
synced 2025-02-28 19:44:35 +00:00
[4.2.x] Fixed typo in docs/topics/class-based-views/mixins.txt.
Backport of 6087bc4e15e89d968396807f8485f4b5624c4f03 from main
This commit is contained in:
parent
ae824eceb1
commit
e4fad1372d
@ -538,11 +538,11 @@ write our own ``get_context_data()`` to make the
|
||||
context["form"] = AuthorInterestForm()
|
||||
return context
|
||||
|
||||
Then the ``AuthorInterestForm`` is a :class:`FormView`, but we have to bring in
|
||||
:class:`~django.views.generic.detail.SingleObjectMixin` so we can find the
|
||||
author we're talking about, and we have to remember to set ``template_name`` to
|
||||
ensure that form errors will render the same template as ``AuthorDetailView``
|
||||
is using on ``GET``::
|
||||
Then the ``AuthorInterestFormView`` is a :class:`FormView`, but we have to
|
||||
bring in :class:`~django.views.generic.detail.SingleObjectMixin` so we can find
|
||||
the author we're talking about, and we have to remember to set
|
||||
``template_name`` to ensure that form errors will render the same template as
|
||||
``AuthorDetailView`` is using on ``GET``::
|
||||
|
||||
from django.http import HttpResponseForbidden
|
||||
from django.urls import reverse
|
||||
|
Loading…
x
Reference in New Issue
Block a user