I am filling my form with initial data using the normail:
form = somethingForm(initial = {
'title' : something.title,
'category' : something.category_id,
})
The title works fine, but if the category is a ModelChoiceField and a ForeignKey in the model, the initial data won't work. Nothing will be selected in the Select Box. If I change category to an IntegerField in the model it works fine.
I still want to use a ForeignKey for category though, so how do I fix this?