mirror of
				https://github.com/django/django.git
				synced 2025-10-31 03:54:51 +00:00 
			
		
		
		
	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
This commit is contained in:
		
							parent
							
								
									cc9e5213f8
								
							
						
					
					
						commit
						4b828a906a
					
				
					 1 changed files with 3 additions and 3 deletions
				
			
		|  | @ -249,7 +249,7 @@ more:: | ||||||
| 
 | 
 | ||||||
|         def get_context_data(self, **kwargs): |         def get_context_data(self, **kwargs): | ||||||
|             # Call the base implementation first to get a context |             # 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 |             # Add in a QuerySet of all the books | ||||||
|             context['book_list'] = Book.objects.all() |             context['book_list'] = Book.objects.all() | ||||||
|             return context |             return context | ||||||
|  | @ -388,7 +388,7 @@ use it in the template:: | ||||||
| 
 | 
 | ||||||
|         def get_context_data(self, **kwargs): |         def get_context_data(self, **kwargs): | ||||||
|             # Call the base implementation first to get a context |             # 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 |             # Add in the publisher | ||||||
|             context['publisher'] = self.publisher |             context['publisher'] = self.publisher | ||||||
|             return context |             return context | ||||||
|  | @ -442,7 +442,7 @@ object, so we simply override it and wrap the call:: | ||||||
| 
 | 
 | ||||||
|         def get_object(self, **kwargs): |         def get_object(self, **kwargs): | ||||||
|             # Call the superclass |             # Call the superclass | ||||||
|             object = super(DetailView, self).get_object(**kwargs) |             object = super(AuthorDetailView, self).get_object(**kwargs) | ||||||
|             # Record the lass accessed date |             # Record the lass accessed date | ||||||
|             object.last_accessed = datetime.datetime.now() |             object.last_accessed = datetime.datetime.now() | ||||||
|             object.save() |             object.save() | ||||||
|  |  | ||||||
		Loading…
	
	Add table
		Add a link
		
	
		Reference in a new issue
	
	 Gabriel Hurley
						Gabriel Hurley