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
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
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
3 matches
Mail list logo