Re: How To Populate A Dropdown List

2011-02-09 Thread Malcolm MacKinnon
And one more file to render the drop down list, order_closeouts.html below. Sorry about the messy code. It ain't pretty but it works for me. Let me know if you have any questions. I forgot to initialize the form in my view. See views.py below. Here's some sample code that works for me: in

Re: How To Populate A Dropdown List

2011-02-09 Thread Malcolm MacKinnon
I forgot to initialize the form in my view. See views.py below. Here's some sample code that works for me: in models.py class InventoryCloseouts(models.Model): prim = models.IntegerField(primary_key=True, db_column='PRIM') # Field name made lowercase. items =

Re: How To Populate A Dropdown List

2011-02-09 Thread Mac
Here's some sample code that works for me: in models.py class InventoryCloseouts(models.Model): prim = models.IntegerField(primary_key=True, db_column='PRIM') # Field name made lowercase. items = models.CharField(max_length=255, db_column='ITEMS', blank=True) # Field name made lowe

Re: How To Populate A Dropdown List

2011-02-09 Thread SimpleDimple
did it work Hank ? On Feb 9, 7:47 am, Brian Neal wrote: > On Feb 8, 10:03 am, hank23 wrote: > > > I have coded a form which will display some data in a dropdown > > selection box. The data is being populated from a a queryset that I > > have setup in the

Re: How To Populate A Dropdown List

2011-02-08 Thread Brian Neal
On Feb 8, 10:03 am, hank23 wrote: > I have coded a form which will display some data in a dropdown > selection box. The data is being populated from a a queryset that I > have setup in the form's code. However the entries in the dropdown > only display as objects of the

Re: How To Populate A Dropdown List

2011-02-08 Thread SimpleDimple
I am new to django so not sure if I am of much help but let me try the key is usually the ID field of your table. for the value to display add a method __str___ in your model, here is sample code from one of my project read more on ___str___ and ___unicode___ methods class

How To Populate A Dropdown List

2011-02-08 Thread hank23
I have coded a form which will display some data in a dropdown selection box. The data is being populated from a a queryset that I have setup in the form's code. However the entries in the dropdown only display as objects of the table from which they're being retrieved, and don't display the