PageRenderTime 39ms CodeModel.GetById 35ms RepoModel.GetById 0ms 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
Possible License(s): BSD-3-Clause
  1. """
  2. Mexican-specific form helpers.
  3. """
  4. from django.forms.fields import Select
  5. class MXStateSelect(Select):
  6. """
  7. A Select widget that uses a list of Mexican states as its choices.
  8. """
  9. def __init__(self, attrs=None):
  10. from mx_states import STATE_CHOICES
  11. super(MXStateSelect, self).__init__(attrs, choices=STATE_CHOICES)