Django

Code

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

Revision 7971, 351 bytes (checked in by jacob, 2 months ago)

Fixed #7741: django.newforms is now django.forms. This is obviously a backwards-incompatible change. There's a warning upon import of django.newforms itself, but deeper imports will raise errors.

  • Property svn:eol-style set to native
Line 
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)
Note: See TracBrowser for help on using the browser.