2010-08-06 16:18:10 +00:00
|
|
|
from django.db import models
|
|
|
|
from django.contrib.localflavor.us.models import USStateField
|
2010-12-23 02:56:31 +00:00
|
|
|
from django.contrib.localflavor.us.models import USPostalCodeField
|
2010-08-06 16:18:10 +00:00
|
|
|
|
|
|
|
# When creating models you need to remember to add a app_label as
|
|
|
|
# 'localflavor', so your model can be found
|
|
|
|
|
|
|
|
class USPlace(models.Model):
|
|
|
|
state = USStateField(blank=True)
|
|
|
|
state_req = USStateField()
|
|
|
|
state_default = USStateField(default="CA", blank=True)
|
2010-12-23 02:56:31 +00:00
|
|
|
postal_code = USPostalCodeField(blank=True)
|
2010-08-06 16:18:10 +00:00
|
|
|
name = models.CharField(max_length=20)
|
2011-07-29 10:20:16 +00:00
|
|
|
|
2010-08-06 16:18:10 +00:00
|
|
|
class Meta:
|
|
|
|
app_label = 'localflavor'
|