Re: Using ModelChoiceField with query set - no error but no list either

2008-12-31 Thread phoebebright
Thanks that makes sense. I'll give it go. Happy New Years --~--~-~--~~~---~--~~ You received this message because you are subscribed to the Google Groups "Django users" group. To post to this group, send email to django-users@googlegroups.com To unsubscribe from

Re: Using ModelChoiceField with query set - no error but no list either

2008-12-31 Thread Daniel Roseman
On Dec 31, 11:13 am, phoebebright wrote: > I have a model that has a car and a car has a foreign key to carmodel > via the field model  (too many models!) > > This is the line for the form which appears to run: > > carmodel=forms.ModelChoiceField(queryset=Car.objects.all().values > ('model','mode

Using ModelChoiceField with query set - no error but no list either

2008-12-31 Thread phoebebright
I have a model that has a car and a car has a foreign key to carmodel via the field model (too many models!) This is the line for the form which appears to run: carmodel=forms.ModelChoiceField(queryset=Car.objects.all().values ('model','model__name').distinct() ) It generates the correct SQL