diff options
| author | Danilo Bargen <gezuru@gmail.com> | 2013-06-13 14:59:13 +0200 |
|---|---|---|
| committer | Danilo Bargen <gezuru@gmail.com> | 2013-06-13 14:59:13 +0200 |
| commit | cd7d7452bca41124b17355d4bf8be317a6d03dae (patch) | |
| tree | e1fac531db747744c959fcc7e6dbc8f676f3941e /docs | |
| parent | 3ce1d303daa92ecb1bc3ba6344f1ec9746a79c70 (diff) | |
Fixed order of base classes in CBV mixin docs
Diffstat (limited to 'docs')
| -rw-r--r-- | docs/topics/class-based-views/mixins.txt | 6 |
1 files changed, 3 insertions, 3 deletions
diff --git a/docs/topics/class-based-views/mixins.txt b/docs/topics/class-based-views/mixins.txt index 980e571c85..3a4811e7bb 100644 --- a/docs/topics/class-based-views/mixins.txt +++ b/docs/topics/class-based-views/mixins.txt @@ -233,7 +233,7 @@ We'll demonstrate this with the publisher modelling we used in the from django.views.generic.detail import SingleObjectMixin from books.models import Author - class RecordInterest(View, SingleObjectMixin): + class RecordInterest(SingleObjectMixin, View): """Records the current user's interest in an author.""" model = Author @@ -446,7 +446,7 @@ Our new ``AuthorDetail`` looks like this:: class AuthorInterestForm(forms.Form): message = forms.CharField() - class AuthorDetail(DetailView, FormMixin): + class AuthorDetail(FormMixin, DetailView): model = Author form_class = AuthorInterestForm @@ -553,7 +553,7 @@ template as ``AuthorDisplay`` is using on ``GET``. from django.views.generic import FormView from django.views.generic.detail import SingleObjectMixin - class AuthorInterest(FormView, SingleObjectMixin): + class AuthorInterest(SingleObjectMixin, FormView): template_name = 'books/author_detail.html' form_class = AuthorInterestForm model = Author |
