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