Re: performance fields in forms.py (province/city problem)

2011-01-13 Thread marco carminati
I create a def that gives to me the potential cities I could have and setup this in the __init__ of my form. def get_cities(Istance): city_list = City.objects.filter(id = 0) province_list_id = Istance.objects.all().values('province').distinct().order_by('province') for province_id in p

Re: performance fields in forms.py (province/city problem)

2011-01-13 Thread Derek
Care to post the solution here (or on a blog)? On Jan 13, 1:31 pm, marco carminati wrote: > solved. > thank you all > > On Jan 12, 8:59 pm, marco carminati wrote: > > > Dear all, > > i'm trying to improve the performance during the modify of one of my > > models' > > > I've the classic province

Re: performance fields in forms.py (province/city problem)

2011-01-13 Thread marco carminati
solved. thank you all On Jan 12, 8:59 pm, marco carminati wrote: > Dear all, > i'm trying to improve the performance during the modify of one of my > models' > > I've the classic province and city structure. > > In the 'insert form', using jquery, I can update the city queryset > after the user c