If you can, populate the widget with all available choices and then use
your JS/AJAX to limit/hide some?
On Saturday, September 21, 2013 6:32:03 PM UTC-5, luke lukes wrote:
>
> Hi everyone.
>
> I'm stucking with a ModelForm in the admin. I have two ChoicheField which
> are populated with choic
Hi everyone.
I'm stucking with a ModelForm in the admin. I have two ChoicheField which
are populated with choices in __init__:
self.fields['city'] = forms.ChoiceField(
required=False,
)
self.fields['city'].choices=get_cities_tuple(region_code=region_code)
self.fields['city'].initial = my_ini
2 matches
Mail list logo