| author | ymh <ymh.work@gmail.com> |
| Wed, 20 Jan 2010 00:34:04 +0100 | |
| changeset 0 | 0d40e90630ef |
| permissions | -rw-r--r-- |
| 0 | 1 |
""" |
2 |
Mexican-specific form helpers. |
|
3 |
""" |
|
4 |
||
5 |
from django.forms.fields import Select |
|
6 |
||
7 |
class MXStateSelect(Select): |
|
8 |
""" |
|
9 |
A Select widget that uses a list of Mexican states as its choices. |
|
10 |
""" |
|
11 |
def __init__(self, attrs=None): |
|
12 |
from mx_states import STATE_CHOICES |
|
13 |
super(MXStateSelect, self).__init__(attrs, choices=STATE_CHOICES) |
|
14 |