I have form:
class AdmItemForm(forms.ModelForm):
id = forms.ModelChoiceField(queryset=Article.objects.all(), widget=forms.HiddenInput())
mainimage = forms.ImageField(widget=AdmImageWidget(), required=False)
tags = TagField(required=False)
.....
class Meta:
model = Article
fields = ('id', 'category', 'date', ....)
but... In the articles table is 10 000 records... Form isn't opened, browser loads data forever.
What happens? Is the ModelChoiceField retrieves all data from a table?
How to fix it?