2011-07-29 17:41:14 +08:00
|
|
|
"""
|
|
|
|
Ecuador-specific form helpers.
|
|
|
|
"""
|
|
|
|
|
2011-10-18 08:47:49 +08:00
|
|
|
from __future__ import absolute_import
|
|
|
|
|
|
|
|
from django.contrib.localflavor.ec.ec_provinces import PROVINCE_CHOICES
|
2011-07-29 17:41:14 +08:00
|
|
|
from django.forms.fields import Select
|
|
|
|
|
|
|
|
class ECProvinceSelect(Select):
|
|
|
|
"""
|
|
|
|
A Select widget that uses a list of Ecuador provinces as its choices.
|
|
|
|
"""
|
|
|
|
def __init__(self, attrs=None):
|
|
|
|
super(ECProvinceSelect, self).__init__(attrs, choices=PROVINCE_CHOICES)
|