~ubuntuone-pqm-team/django/stable

« back to all changes in this revision

Viewing changes to django/contrib/localflavor/ec/forms.py

  • Committer: Matias Bordese
  • Date: 2014-08-21 21:22:40 UTC
  • Revision ID: matias.bordese@canonical.com-20140821212240-tij4ms6qzjbdiioz
Tags: 1.5.9
Imported Django 1.5.9 from released tarball.

Show diffs side-by-side

added added

removed removed

Lines of Context:
 
1
"""
 
2
Ecuador-specific form helpers.
 
3
"""
 
4
 
 
5
from __future__ import absolute_import
 
6
 
 
7
from django.contrib.localflavor.ec.ec_provinces import PROVINCE_CHOICES
 
8
from django.forms.fields import Select
 
9
 
 
10
class ECProvinceSelect(Select):
 
11
    """
 
12
    A Select widget that uses a list of Ecuador provinces as its choices.
 
13
    """
 
14
    def __init__(self, attrs=None):
 
15
        super(ECProvinceSelect, self).__init__(attrs, choices=PROVINCE_CHOICES)