Skip to content
This repository

HTTPS clone URL

Subversion checkout URL

You can clone with HTTPS or Subversion.

Download ZIP
Browse code

Fixed three super() calls which used the wrong classes in the example…

…s. Thanks to robhudson for the report.

git-svn-id: http://code.djangoproject.com/svn/django/trunk@14267 bcc190cf-cafb-0310-a4f2-bffc1f526a37
  • Loading branch information...
commit 4b828a906a2c0837e9607e8909418090cb7aee0c 1 parent cc9e521
authored October 18, 2010

Showing 1 changed file with 3 additions and 3 deletions. Show diff stats Hide diff stats

  1. 6  docs/topics/class-based-views.txt
6  docs/topics/class-based-views.txt
@@ -249,7 +249,7 @@ more::
249 249
 
250 250
         def get_context_data(self, **kwargs):
251 251
             # Call the base implementation first to get a context
252  
-            context = super(DetailView, self).get_context_data(**kwargs)
  252
+            context = super(PublisherDetailView, self).get_context_data(**kwargs)
253 253
             # Add in a QuerySet of all the books
254 254
             context['book_list'] = Book.objects.all()
255 255
             return context
@@ -388,7 +388,7 @@ use it in the template::
388 388
 
389 389
         def get_context_data(self, **kwargs):
390 390
             # Call the base implementation first to get a context
391  
-            context = super(ListView, self).get_context_data(**kwargs)
  391
+            context = super(PublisherBookListView, self).get_context_data(**kwargs)
392 392
             # Add in the publisher
393 393
             context['publisher'] = self.publisher
394 394
             return context
@@ -442,7 +442,7 @@ object, so we simply override it and wrap the call::
442 442
 
443 443
         def get_object(self, **kwargs):
444 444
             # Call the superclass
445  
-            object = super(DetailView, self).get_object(**kwargs)
  445
+            object = super(AuthorDetailView, self).get_object(**kwargs)
446 446
             # Record the lass accessed date
447 447
             object.last_accessed = datetime.datetime.now()
448 448
             object.save()

0 notes on commit 4b828a9

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