UPDATE (8/4/2011):
Where have you been all my life, empty_label? Of course, Django has a much cleaner non-javascript solution:
def __init__(self, *args, **kwargs):
super(MyForm, self).__init__(*args, **kwargs)
self.fields['field1'].empty_label = 'Select Something'
self.fields['field2'].empty_label = 'Select Something Else'
UPDATE (4/5/2011):
When you do what I suggested in the original post, the default shows up, as expected, but it turns out you lose all of Django's automatic ability to deal with the ModelForm, so you have to do all of the form processing manually. Blah. A much better solution is to ...
Recent comments