mirror of
https://github.com/django/django.git
synced 2025-10-31 09:41:08 +00:00
Removed django.contrib.localflavor.
Each localflavor lives on as a separate app.
This commit is contained in:
@@ -660,15 +660,13 @@ model.
|
||||
|
||||
For example, this model has a few custom methods::
|
||||
|
||||
from django.contrib.localflavor.us.models import USStateField
|
||||
|
||||
class Person(models.Model):
|
||||
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 = USStateField() # Yes, this is America-centric...
|
||||
state = models.CharField(max_length=2) # yes, this is America-centric
|
||||
|
||||
def baby_boomer_status(self):
|
||||
"Returns the person's baby-boomer status."
|
||||
|
||||
Reference in New Issue
Block a user