#18883: self is missing
-------------------------------------+--------------------
Reporter: jules_winnfield85@… | Owner: nobody
Type: Bug | Status: new
Component: Documentation | Version: 1.4
Severity: Normal | Keywords:
Triage Stage: Unreviewed | Has patch: 0
Easy pickings: 0 | UI/UX: 0
-------------------------------------+--------------------
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
--
Ticket URL: <https://code.djangoproject.com/ticket/18883>
Django <https://code.djangoproject.com/>
The Web framework for perfectionists with deadlines.
--
You received this message because you are subscribed to the Google Groups
"Django updates" group.
To post to this group, send email to [email protected].
To unsubscribe from this group, send email to
[email protected].
For more options, visit https://groups.google.com/groups/opt_out.