1👍
✅
forms.py:
class MyForm(forms.Form):
# or with some filter applied
my_field = forms.ModelChoiceField(queryset=Equipment.objects.all())
Then just use {{ form.as_<whatever you want> }}
in your template and it should work.
👤knbk
Source:stackexchange.com