[Fixed]-Django admin – Inline with choices from database

1👍

✅

You should replace your ChoiceField with a ModelChoiceField. They allow you to specify a queryset to populate the choices.

category = forms.ModelChoiceField(queryset=Category.objects.all(), empty_label="(Nothing)")

Leave a comment