Skip to content

Commit

Permalink
Fixed #8759 -- Corrected a typo in example code. Thanks James Tauber …
Browse files Browse the repository at this point in the history
…for the find.

git-svn-id: http://code.djangoproject.com/svn/django/trunk@8826 bcc190cf-cafb-0310-a4f2-bffc1f526a37
  • Loading branch information
brosner committed Sep 1, 2008
1 parent a9465a7 commit 502fc3a
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions docs/topics/db/models.txt
Expand Up @@ -701,7 +701,7 @@ to happen whenever you save an object. For example (see


def save(self, force_insert=False, force_update=False): def save(self, force_insert=False, force_update=False):
do_something() do_something()
super(Blog, self).save(force_inset, force_update) # Call the "real" save() method. super(Blog, self).save(force_insert, force_update) # Call the "real" save() method.
do_something_else() do_something_else()


You can also prevent saving:: You can also prevent saving::
Expand All @@ -714,7 +714,7 @@ You can also prevent saving::
if self.name == "Yoko Ono's blog": if self.name == "Yoko Ono's blog":
return # Yoko shall never have her own blog! return # Yoko shall never have her own blog!
else: else:
super(Blog, self).save(force_inset, force_update) # Call the "real" save() method. super(Blog, self).save(force_insert, force_update) # Call the "real" save() method.


It's important to remember to call the superclass method -- that's that It's important to remember to call the superclass method -- that's that
``super(Blog, self).save()`` business -- to ensure that the object still gets ``super(Blog, self).save()`` business -- to ensure that the object still gets
Expand Down

0 comments on commit 502fc3a

Please sign in to comment.