Ticket #17510: patch_17510.diff

File patch_17510.diff, 965 bytes (added by noria, 4 years ago)
  • docs/topics/class-based-views.txt

    diff --git a/docs/topics/class-based-views.txt b/docs/topics/class-based-views.txt
    index 3812fae..d375e8d 100644
    a b Next, we'll write the ``PublisherBookListView`` view itself:: 
    380380    class PublisherBookListView(ListView):
    381381
    382382        context_object_name = "book_list"
    383         template_name = "books/books_by_publisher.html",
     383        template_name = "books/books_by_publisher.html"
    384384
    385385        def get_queryset(self):
    386386            publisher = get_object_or_404(Publisher, name__iexact=self.args[0])
    use it in the template:: 
    396396    class PublisherBookListView(ListView):
    397397
    398398        context_object_name = "book_list"
    399         template_name = "books/books_by_publisher.html",
     399        template_name = "books/books_by_publisher.html"
    400400
    401401        def get_queryset(self):
    402402            self.publisher = get_object_or_404(Publisher, name__iexact=self.args[0])
Back to Top