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