Opened 12 years ago

Closed 12 years ago

#18589 closed Cleanup/optimization (fixed)

Typo in class-based generic views doc

Reported by: cpthomas@… Owned by: nobody
Component: Documentation Version: 1.4
Severity: Normal Keywords: documentation, typo
Cc: Triage Stage: Accepted
Has patch: no Needs documentation: no
Needs tests: no Patch needs improvement: no
Easy pickings: yes UI/UX: no

Description

On this page: https://docs.djangoproject.com/en/dev/topics/class-based-views/generic-display/, under the Dynamic Filtering heading, there is a typo in the 3rd code example

PublisherBookListView should be PublisherBookList to match the previous code examples.

Existing:

def get_context_data(self, **kwargs):
    # Call the base implementation first to get a context
    context = super(PublisherBookListView, self).get_context_data(**kwargs)
    # Add in the publisher
    context['publisher'] = self.publisher
    return context

Revised:

# ...

def get_context_data(self, **kwargs):
    # Call the base implementation first to get a context
    context = super(PublisherBookList, self).get_context_data(**kwargs)
    # Add in the publisher
    context['publisher'] = self.publisher
    return context

Change History (2)

comment:1 by Aymeric Augustin, 12 years ago

Triage Stage: UnreviewedAccepted

comment:2 by Aymeric Augustin <aymeric.augustin@…>, 12 years ago

Resolution: fixed
Status: newclosed

In [d94cfdcfae92fd4409cd1b5e14eebc75033266fd]:

Fixed #18589 -- Typo in generic CBV docs.

Thanks cpthomas for the report.

Note: See TracTickets for help on using tickets.
Back to Top