Skip to content

HTTPS clone URL

Subversion checkout URL

You can clone with HTTPS or Subversion.

Download ZIP
Browse files

Fixed #2141 -- corrected indentation problems in a couple of the code…

… fragments.

git-svn-id: http://code.djangoproject.com/svn/django/trunk@3126 bcc190cf-cafb-0310-a4f2-bffc1f526a37
  • Loading branch information...
commit ed1dcbf3e7313ea4bb779210f09cf3e4c7e7956f 1 parent 97fedcc
@malcolmt malcolmt authored
Showing with 9 additions and 9 deletions.
  1. +9 −9 docs/model-api.txt
View
18 docs/model-api.txt
@@ -1634,10 +1634,10 @@ to happen whenever you save an object. For example::
name = models.CharField(maxlength=100)
tagline = models.TextField()
- def save(self):
- do_something()
- super(Blog, self).save() # Call the "real" save() method.
- do_something_else()
+ def save(self):
+ do_something()
+ super(Blog, self).save() # Call the "real" save() method.
+ do_something_else()
You can also prevent saving::
@@ -1645,11 +1645,11 @@ You can also prevent saving::
name = models.CharField(maxlength=100)
tagline = models.TextField()
- def save(self):
- if self.name == "Yoko Ono's blog":
- return # Yoko shall never have her own blog!
- else:
- super(Blog, self).save() # Call the "real" save() method.
+ def save(self):
+ if self.name == "Yoko Ono's blog":
+ return # Yoko shall never have her own blog!
+ else:
+ super(Blog, self).save() # Call the "real" save() method.
.. _database API docs: http://www.djangoproject.com/documentation/db_api/
Please sign in to comment.
Something went wrong with that request. Please try again.