Django

Code

Changeset 8230

Show
Ignore:
Timestamp:
08/08/08 10:34:02 (4 months ago)
Author:
mtredinnick
Message:

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.

Files:

Legend:

Unmodified
Added
Removed
Modified
Copied
Moved
  • django/trunk/django/contrib/localflavor/pe/forms.py

    r7971 r8230  
    88from django.utils.translation import ugettext_lazy as _ 
    99 
    10 class PEDepartmentSelect(Select): 
     10class PERegionSelect(Select): 
    1111    """ 
    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. 
    1313    """ 
    1414    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) 
    1717 
    1818class PEDNIField(CharField): 
  • django/trunk/django/contrib/localflavor/pe/pe_region.py

    r7294 r8230  
    11# -*- coding: utf-8 -*- 
    22""" 
    3 A list of Peru departaments as `choices` in a 
    4 formfield. 
     3A list of Peru regions as `choices` in a formfield. 
    54 
    65This exists in this standalone file so that it's only imported into memory 
     
    87""" 
    98 
    10 DEPARTMENT_CHOICES = ( 
     9REGION_CHOICES = ( 
    1110    ('AMA', u'Amazonas'), 
    1211    ('ANC', u'Ancash'), 
     
    1514    ('AYA', u'Ayacucho'), 
    1615    ('CAJ', u'Cajamarca'), 
     16    ('CAL', u'Callao'), 
    1717    ('CUS', u'Cusco'), 
    1818    ('HUV', u'Huancavelica'),