diff options
| author | Tim Graham <timograham@gmail.com> | 2014-07-08 08:56:41 -0400 |
|---|---|---|
| committer | Tim Graham <timograham@gmail.com> | 2014-07-08 08:57:41 -0400 |
| commit | 9918b76447e601631e160d27feb4d873d7d99d8b (patch) | |
| tree | de9a39e03a2fc8142842992b94b3afd8ded3a29d | |
| parent | 1318254669d1b7f8b09c2558e4f187fa1ee2884c (diff) | |
[1.7.x] Fixed #22978 -- Removed a USA-centric example that didn't add much.
Backport of 9f18b6bcb0 from master
| -rw-r--r-- | docs/topics/db/models.txt | 7 |
1 files changed, 0 insertions, 7 deletions
diff --git a/docs/topics/db/models.txt b/docs/topics/db/models.txt index 3873bd902c..a143a89726 100644 --- a/docs/topics/db/models.txt +++ b/docs/topics/db/models.txt @@ -704,9 +704,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." @@ -718,10 +715,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) |
