Newbie Django question: I\'d like the Django admin to display more rows of choices in the multi-select widget. I have an extremely long list to select from and the default 4
I was able to make number of rows according to initial number of related table rows, however it does not updates dynamically (probably need to insert Javascript into admin form and query number of rows via AJAX, that would be too big to post here).
class ProfileAdminForm(forms.ModelForm):
class Meta:
model = Profile
fields = '__all__'
widgets = {
# Will dynamically change number of rows in select multiple, however only after server reload.
'spec_profiles': forms.SelectMultiple(attrs={'size': SpecProfile.objects.count()})
}
class ProfileAdmin(admin.ModelAdmin):
form = ProfileAdminForm