Opened 12 years ago

Closed 12 years ago

Last modified 11 years ago

#18883 closed Bug (fixed)

self is missing

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

Description

paragraph: Model instance reference -> Creating objects -> Note -> 2:

class BookManager(models.Manager):

def create_book(title):

book = self.create(title=title)
# do something with the book
return book

correct:

class BookManager(models.Manager):

def create_book(self, title):

book = self.create(title=title)
# do something with the book
return book

Change History (2)

comment:1 by Alex Gaynor <alex.gaynor@…>, 12 years ago

Resolution: fixed
Status: newclosed

In [17d57275f991f001fbdbf4a85159244096f43499]:

Fixed #18883 -- added a missing self parameter in the docs

comment:2 by Tim Graham <timograham@…>, 11 years ago

In 6297673efda48e72012da5ccea59d6b55cad3eff:

[1.5.X] Fixed #18883 -- added a missing self parameter in the docs

Backport of 17d57275f9 from master

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