Skip to content
This repository

HTTPS clone URL

Subversion checkout URL

You can clone with HTTPS or Subversion.

Download ZIP
Browse code

Fixed #7575 -- Peru now has regions, not departments (changed at some…

… pointi n

the last year or so). Thanks andresj and programmerq.

This is backwards incompatible if you're using the Peruvian localflavor.


git-svn-id: http://code.djangoproject.com/svn/django/trunk@8230 bcc190cf-cafb-0310-a4f2-bffc1f526a37
  • Loading branch information...
commit 44e407b7c6fbcd85307c6723ccd6fdd34946f821 1 parent 567b9f2
Malcolm Tredinnick authored August 08, 2008
8  django/contrib/localflavor/pe/forms.py
@@ -7,13 +7,13 @@
7 7
 from django.forms.fields import RegexField, CharField, Select, EMPTY_VALUES
8 8
 from django.utils.translation import ugettext_lazy as _
9 9
 
10  
-class PEDepartmentSelect(Select):
  10
+class PERegionSelect(Select):
11 11
     """
12  
-    A Select widget that uses a list of Peruvian Departments as its choices.
  12
+    A Select widget that uses a list of Peruvian Regions as its choices.
13 13
     """
14 14
     def __init__(self, attrs=None):
15  
-        from pe_department import DEPARTMENT_CHOICES
16  
-        super(PEDepartmentSelect, self).__init__(attrs, choices=DEPARTMENT_CHOICES)
  15
+        from pe_region import REGION_CHOICES
  16
+        super(PERegionSelect, self).__init__(attrs, choices=REGION_CHOICES)
17 17
 
18 18
 class PEDNIField(CharField):
19 19
     """
6  django/contrib/localflavor/pe/pe_department.py → django/contrib/localflavor/pe/pe_region.py
... ...
@@ -1,19 +1,19 @@
1 1
 # -*- coding: utf-8 -*-
2 2
 """
3  
-A list of Peru departaments as `choices` in a
4  
-formfield.
  3
+A list of Peru regions as `choices` in a formfield.
5 4
 
6 5
 This exists in this standalone file so that it's only imported into memory
7 6
 when explicitly needed.
8 7
 """
9 8
 
10  
-DEPARTMENT_CHOICES = (
  9
+REGION_CHOICES = (
11 10
     ('AMA', u'Amazonas'),
12 11
     ('ANC', u'Ancash'),
13 12
     ('APU', u'Apurímac'),
14 13
     ('ARE', u'Arequipa'),
15 14
     ('AYA', u'Ayacucho'),
16 15
     ('CAJ', u'Cajamarca'),
  16
+    ('CAL', u'Callao'),
17 17
     ('CUS', u'Cusco'),
18 18
     ('HUV', u'Huancavelica'),
19 19
     ('HUC', u'Huánuco'),

0 notes on commit 44e407b

Please sign in to comment.
Something went wrong with that request. Please try again.