Skip to content


Subversion checkout URL

You can clone with
Download ZIP
Browse files

Merge pull request #1265 from dbrgn/mixin_order

Fixed order of base classes in CBV mixin docs
  • Loading branch information...
commit 675558d00efab507ef2e538025f20abc6725b159 2 parents 3ce1d30 + cd7d745
@mjtamlyn mjtamlyn authored
Showing with 3 additions and 3 deletions.
  1. +3 −3 docs/topics/class-based-views/mixins.txt
6 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

0 comments on commit 675558d

Please sign in to comment.
Something went wrong with that request. Please try again.