Opened 2 years ago

Closed 2 years ago

Last modified 22 months 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:
Needs tests: Patch needs improvement:
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 Changed 2 years ago by Alex Gaynor <alex.gaynor@…>

  • Resolution set to fixed
  • Status changed from new to closed

In [17d57275f991f001fbdbf4a85159244096f43499]:

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

comment:2 Changed 22 months ago by Tim Graham <timograham@…>

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