Q:

list Box Django Forms

I'm using Django forms and need to create a list box.
What would be the equivalent of listbox in Django form fields?
I checked the documentation @ 
https://docs.djangoproject.com/en/dev/ref/forms/fields/#modelchoicefield

but unable to find it.
Here is my code snippet,
Models.py
    class Volunteer(models.Model):
     NO_OF_HRS = (('1','1')
                  ('2','2'))
     datecreated = models.DateTimeField()
     volposition = models.CharField(max_length=300)
     roledesc    = models.CharField(max_length=300)
     Duration    = models.CharField(choices=NO_OF_HRS,max_length=1)**

forms.py
class VolunteerForm(forms.ModelForm)
     datecreated = forms.DateField(label=u'Creation Date')
     volposition = forms.CharField(label=u'Position Name', max_length=300)
     roledesc    = forms.roledesc(label=u'Role description',max_length=5000)
     Duration    = forms.CharField(widget=forms.select(choices=NO_OF_HRS),max_length=2)

When I try to run, I get the following error,
NO_OF_HRS is not defined

A:

Your NO_OF_HRS tuple is defined inside the model and not available to the form. It has to be imported in forms.py just like any other Python object. Try moving the tuple outside the model definition and import in your forms.py like this:
models.py
NO_OF_HRS = (('1','1')
             ('2','2'))

class Volunteer(models.Model):
    # ...
    duration = models.CharField(choices=NO_OF_HRS, max_length=1)

forms.py
from path.to.models import NO_OF_HRS

class VolunteerForm(forms.Form):
    # ...
    duration = forms.CharField(widget=forms.Select(choices=NO_OF_HRS), max_length=1)

It also looks like you want to use a ModelForm. In this case you don't need to add any field definitions to your VolunteerForm, simply set your model in the inner Meta class.
forms.py
from path.to.models Volunteer

class VolunteerForm(forms.ModelForm):
    class Meta:
        model = Volunteer

