PageRenderTime 13ms CodeModel.GetById 10ms app.highlight 1ms RepoModel.GetById 1ms app.codeStats 0ms

/django/contrib/localflavor/mx/forms.py

https://code.google.com/p/mango-py/
Python | 14 lines | 5 code | 3 blank | 6 comment | 0 complexity | 57b5f2b7a0dd58305abd309dd9571f57 MD5 | raw file
 1"""
 2Mexican-specific form helpers.
 3"""
 4
 5from django.forms.fields import Select
 6
 7class 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