app/django/contrib/localflavor/mx/forms.py
author Lennard de Rijk <ljvderijk@gmail.com>
Sun, 12 Jul 2009 00:45:45 +0200
changeset 2607 4ddee5470cc9
parent 323 ff1a9aa48cfd
permissions -rw-r--r--
Added tag 0-5-20090711p1 for changeset 03aa33e8600b

"""
Mexican-specific form helpers.
"""

from django.forms.fields import Select

class MXStateSelect(Select):
    """
    A Select widget that uses a list of Mexican states as its choices.
    """
    def __init__(self, attrs=None):
        from mx_states import STATE_CHOICES
        super(MXStateSelect, self).__init__(attrs, choices=STATE_CHOICES)