Is there a way to make Django's USStateField () so that it does not have a preselected value?


I use USStateField() from Django's localflavor in one of my models:

class MyClass(models.Model):
   state  = USStateField(blank=True)

Then I made a form from that class:

class MyClassForm(forms.ModelForm):
    class Meta:
        model   = MyClass

When I display the form, the field "State" is a drop-down box with "Alabama" pre-selected.

Is there any way to make the drop-down box to show no pre-selected value at all?

This seems to be a known issue (though I'm not aware of a ticket - I'd double-check there's not a ticket for it, and if not, file it):

from import STATE_CHOICES
from import USStateField

class YourModelForm(forms.ModelForm):
    class Meta:

    YOUR_STATE_CHOICES.insert(0, ('', '---------'))
    state = USStateField(widget=forms.Select(

Above code from here.