Fixed #18589 -- Typo in generic CBV docs.

Thanks cpthomas for the report.
This commit is contained in:
Aymeric Augustin 2012-07-07 17:42:04 +02:00
parent bbc590697a
commit d94cfdcfae
1 changed files with 4 additions and 4 deletions

View File

@ -220,7 +220,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(PublisherDetailView, self).get_context_data(**kwargs) context = super(PublisherDetail, 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
@ -284,7 +284,7 @@ technique::
from django.views.generic import ListView from django.views.generic import ListView
from books.models import Book from books.models import Book
class AcmeBookListView(ListView): class AcmeBookList(ListView):
context_object_name = 'book_list' context_object_name = 'book_list'
queryset = Book.objects.filter(publisher__name='Acme Publishing') queryset = Book.objects.filter(publisher__name='Acme Publishing')
@ -361,7 +361,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(PublisherBookListView, self).get_context_data(**kwargs) context = super(PublisherBookList, 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