Erisa
unread,Dec 31, 2011, 4:52:54 PM12/31/11Sign in to reply to author
Sign in to forward
You do not have permission to delete messages in this group
Either email addresses are anonymous for this group or you need the view member email addresses permission to view the original message
to Django users
I wanted to have a select box for the state with California as the
default. I first tried in my model the following:
state = USStateField(blank=True, default='CA')
This gave me the error "TypeError: __init__() got an unexpected
keyword argument 'default'".
But the following works (i.e., California is the default and I have a
nice select box):
state = models.CharField(blank=True, max_length=2,
choices=STATE_CHOICES, default='CA')
Could this be a bug? I am using 1.3.