app/django/contrib/localflavor/mx/forms.py
author Sverre Rabbelier <srabbelier@gmail.com>
Sat, 12 Sep 2009 17:10:39 +0200
changeset 2907 fbf0d63f37b9
parent 323 ff1a9aa48cfd
permissions -rw-r--r--
Remove memcache setup from interactive.py script Memcache integration with remote_api has been added in the latest AppEngine release, so we no longer have to use the stub.

"""
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)