I solved populating those ChoiceField in __init__
with all choiches available, and the populating only the widget choices:
def __init__(self, *args, **kwargs):
self.fields['city'] = forms.ChoiceField(
required=False,
choices=get_all_cities_tuple()
)
self.fields['zip'] = forms.ChoiceField(
required=False,
choices=get_all_zips_tuple()
)
self.fields['city'].widget.choices=get_cities_tuple(region_code=region_code)
self.fields['city'].initial = my_initial_city_value
self.fields['zip'].widget.choices=get_zips_tuple(
region_code=region_code,
city_name=city_name
)
self.fields['zip'].initial = my_initial_zip_value
While this is not the best approach in term of computational cost, that's what have worked for me for this specific task.