aemdy
aemdy

Reputation: 3802

Django form select widget's label

now, whenever I create a model form which has a FK field, a select menu shows up and the first item is --------- which means that nothing is selected. How can I change -------- to "Choose something" or whatever I want?

Upvotes: 0

Views: 642

Answers (1)

Jingo
Jingo

Reputation: 3240

This is the emtpy label of ModelChoiceField. You can set it by ModelChoiceField(empty_label=u'your text here').

Upvotes: 2

Related Questions