Re: how to compose templates with widgets (that has dynamic contents in it)

2011-03-20 Thread Shawn Milochik
1. Create a Django form. 2. Add a ChoiceField to the form. 3. Populate the ChoiceField's 'choices' properly with an iterable (tuple or list) full of iterables containing the key and value you like. 4. Put the form into your template somewhere within your HTML form. Shawn P.S. I recommend doing

how to compose templates with widgets (that has dynamic contents in it)

2011-03-20 Thread django beginner
hi django experts! May I know how to create templates that has django widgets in it? please refer to my should-be template output below: Name: here is the sample model: class Name(models.Model): name_id = models.AutoField(primary_key=True)