Commits

Afonso Fernandez Nogueira committed ce661bd

Province Select widget

  • Participants
  • Parent commits 8c44dcb

Comments (0)

Files changed (1)

File django_l10n_es_ga/forms.py

 # -*- coding: utf-8 -*-
 """
-ES-GA-specific Form helpers
+Galicia-specific Form helpers
 """
 
 from __future__ import absolute_import, unicode_literals
-
 from django.forms.fields import Select
 from .es_ga_municipalities import MUNICIPALITY_CHOICES
 from .es_ga_comarcas import COMARCA_CHOICES
+from .es_ga_provinces import PROVINCE_CHOICES
 
 
 class ESGAMunicipalitySelect(Select):
     """
     def __init__(self, attrs=None):
         super(ESGAComarcaSelect, self).__init__(attrs, choices=COMARCA_CHOICES)
+
+
+class ESGAProvinceSelect(Select):
+    """
+    A Select widget that uses a list of Galician provinces as its choices.
+    """
+    def __init__(self, attrs=None):
+        super(ESGAProvinceSelect, self).__init__(attrs, choices=PROVINCE_CHOICES)