What I'm trying to do seems relatively simple, but I have yet to find
a proper solution for it.

I'm trying to query a list of years from a database of registered
vehicles in my county and display them in a drop-down select menu in a
form.

Since the registered vehicles database has many  cars of the same
year,  I need to make those results from the query display in a unique
(no duplicate 2007 options for example), descending order when the
select menu is clicked.

Here's what I've been using so far in my forms.py file:
#class SearchForm(forms.ModelForm):
#    year = forms.ModelChoiceField
#    class Meta:
#        model = Vehicle

This only gives me an empty text field.
I'm fairly new to Django, so any help would be greatly appreciated.

--~--~---------~--~----~------------~-------~--~----~
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 this group, send email to [EMAIL PROTECTED]
For more options, visit this group at 
http://groups.google.com/group/django-users?hl=en
-~----------~----~----~----~------~----~------~--~---

Reply via email to