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
ear = forms.ChoiceField()
>
> def __init__(self, *args, **kwargs):
> super(SearchForm, self) .__init__(*args, **kwargs)
>
> self.fields['year'].choices = \
> set([(obj.year, obj.year) for obj in \
> Vehicle.objects.all().order
;models.py - http://dpaste.com/80010/
http://dpaste.com/80009/";>forms.py - http://dpaste.com/80009/
http://dpaste.com/80011/";>views.py - http://dpaste.com/80011/
http://dpaste.com/80013/";>search.html - http://dpaste.com/80013/
On Sep 23, 1:32 am, Daniel Roseman <[E
I had SOME luck with "queryset=Vehicle.objects.filter(year=True)" in
that the form actually rendered in my template, but the year select
box is empty now. All other select boxes load fine (Make and Model)
with their data...only year still won't work.
On Sep 23, 10:44 am, BobZ &l
Sep 23, 4:37 pm, Daniel Roseman <[EMAIL PROTECTED]>
wrote:
> On Sep 23, 4:44 pm, BobZ <[EMAIL PROTECTED]> wrote:
>
>
>
> > Thanks Daniel. I've found solutions similar to yours in other threads
> > on the net, and everytime I test them, I literally get
I'm having a similar problem actually.
I'm trying to extend Photologue to offer front-end user upload
capability with generic views and I haven't been able to successfully
render a page yet.
Each of the commented-out "upload_args" are variations I've tried to
get something back and none of them h
).__init__(*args, **kwargs)
class Meta:
model = Photo
exclude = ( 'user', 'title_slug', 'view_count',
'date_added', )
On Aug 24, 10:57 am, Daniel Roseman wrote:
> On Aug 24, 4:26 pm, BobZ wrote:
>
>
>
> > I'm ha
The real brain buster is that I get this error whether I'm passing a
form_class or a simple Model in urls.py
On Aug 24, 11:05 am, BobZ wrote:
> Thanks for the quick response!
>
> forms.py
>
> from django import forms
> from django.forms import ModelForm
> from mod
5:06 pm, BobZ wrote:
>
>
>
> > The real brain buster is that I get this error whether I'm passing a
> > form_class or a simple Model in urls.py
>
> > On Aug 24, 11:05 am, BobZ wrote:
>
> > > Thanks for the quick response!
>
> > > forms
9 matches
Mail list logo