Skip to content

HTTPS clone URL

Subversion checkout URL

You can clone with HTTPS or Subversion.

Download ZIP
Browse files

[1.6.x] Fixed #22978 -- Removed a USA-centric example that didn't add…

… much.

Backport of 9f18b6b from master
  • Loading branch information...
commit d8f7e00708dec84237954cde17a27e1afb657438 1 parent 837cad0
@timgraham timgraham authored
Showing with 0 additions and 7 deletions.
  1. +0 −7 docs/topics/db/models.txt
View
7 docs/topics/db/models.txt
@@ -684,9 +684,6 @@ For example, this model has a few custom methods::
first_name = models.CharField(max_length=50)
last_name = models.CharField(max_length=50)
birth_date = models.DateField()
- address = models.CharField(max_length=100)
- city = models.CharField(max_length=50)
- state = models.CharField(max_length=2) # yes, this is America-centric
def baby_boomer_status(self):
"Returns the person's baby-boomer status."
@@ -698,10 +695,6 @@ For example, this model has a few custom methods::
else:
return "Post-boomer"
- def is_midwestern(self):
- "Returns True if this person is from the Midwest."
- return self.state in ('IL', 'WI', 'MI', 'IN', 'OH', 'IA', 'MO')
-
def _get_full_name(self):
"Returns the person's full name."
return '%s %s' % (self.first_name, self.last_name)
Please sign in to comment.
Something went wrong with that request. Please try again.