diff options
| author | Gabriel Hurley <gabehr@gmail.com> | 2010-10-18 23:11:14 +0000 |
|---|---|---|
| committer | Gabriel Hurley <gabehr@gmail.com> | 2010-10-18 23:11:14 +0000 |
| commit | 4b828a906a2c0837e9607e8909418090cb7aee0c (patch) | |
| tree | 9ab4657dd746d41c3d32e0ea293fe982a1d81f90 /docs | |
| parent | cc9e5213f833d5dd30f47c1f180f5ec615ad864c (diff) | |
Fixed three super() calls which used the wrong classes in the examples. Thanks to robhudson for the report.
git-svn-id: http://code.djangoproject.com/svn/django/trunk@14267 bcc190cf-cafb-0310-a4f2-bffc1f526a37
Diffstat (limited to 'docs')
| -rw-r--r-- | docs/topics/class-based-views.txt | 6 |
1 files changed, 3 insertions, 3 deletions
diff --git a/docs/topics/class-based-views.txt b/docs/topics/class-based-views.txt index 7c4b4a3efa..005cd4487a 100644 --- a/docs/topics/class-based-views.txt +++ b/docs/topics/class-based-views.txt @@ -249,7 +249,7 @@ more:: def get_context_data(self, **kwargs): # Call the base implementation first to get a context - context = super(DetailView, self).get_context_data(**kwargs) + context = super(PublisherDetailView, self).get_context_data(**kwargs) # Add in a QuerySet of all the books context['book_list'] = Book.objects.all() return context @@ -388,7 +388,7 @@ use it in the template:: def get_context_data(self, **kwargs): # Call the base implementation first to get a context - context = super(ListView, self).get_context_data(**kwargs) + context = super(PublisherBookListView, self).get_context_data(**kwargs) # Add in the publisher context['publisher'] = self.publisher return context @@ -442,7 +442,7 @@ object, so we simply override it and wrap the call:: def get_object(self, **kwargs): # Call the superclass - object = super(DetailView, self).get_object(**kwargs) + object = super(AuthorDetailView, self).get_object(**kwargs) # Record the lass accessed date object.last_accessed = datetime.datetime.now() object.save() |
