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