Ticket #8013: localflavor-coec.patch
File localflavor-coec.patch, 6.3 KB (added by , 16 years ago) |
---|
-
django/contrib/localflavor/ec/ec_provinces.py
1 # -*- coding: utf-8 -*- 2 """ 3 A list of Ecuador departaments as `choices` in a 4 formfield. 5 6 This exists in this standalone file so that it's only imported into memory 7 when explicitly needed. 8 """ 9 10 PROVINCE_CHOICES = ( 11 ('01',u'Azuay'), 12 ('02',u'Bolívar'), 13 ('03',u'Cañar'), 14 ('04',u'Carchi'), 15 ('05',u'Cotopaxi'), 16 ('06',u'Chimborazo'), 17 ('07',u'El Oro'), 18 ('08',u'Esmeraldas'), 19 ('09',u'Guayas'), 20 ('10',u'Imbabura'), 21 ('11',u'Loja'), 22 ('12',u'Los Ríos'), 23 ('13',u'Manabí'), 24 ('14',u'Morona Santiago'), 25 ('15',u'Napo'), 26 ('16',u'Pastaza'), 27 ('17',u'Pichincha'), 28 ('18',u'Tungurahua'), 29 ('19',u'Zamora Chinchipe'), 30 ('20',u'Galápagos'), 31 ('21',u'Sucumbíos'), 32 ('22',u'Orellana'), 33 ('23',u'Sto. Domingo De Los Tsáchilas'), 34 ('24',u'Santa Elena'), 35 ) -
django/contrib/localflavor/ec/forms.py
1 """ 2 Ecuador-specific form helpers. 3 """ 4 5 from django.forms.fields import Select 6 7 class ECProvinceSelect(Select): 8 """ 9 A Select widget that uses a list of Ecuador provinces as its choices. 10 """ 11 def __init__(self, attrs=None): 12 from ec_provinces import PROVINCE_CHOICES 13 super(ECProvinceSelect, self).__init__(choices=PROVINCE_CHOICES) 14 -
django/contrib/localflavor/co/forms.py
1 """ 2 Colombian-specific form helpers. 3 """ 4 5 from django.forms.fields import Select 6 7 class CODepartmentSelect(Select): 8 """ 9 A Select widget that uses a list of Colombian states as its choices. 10 """ 11 def __init__(self, attrs=None): 12 from co_departments import DEPARTMENT_CHOICES 13 super(CODepartmentSelect, self).__init__(choices=DEPARTMENT_CHOICES) 14 -
django/contrib/localflavor/co/co_departments.py
1 # -*- coding: utf-8 -*- 2 """ 3 A list of Colombian departaments as `choices` in a 4 formfield. 5 6 This exists in this standalone file so that it's only imported into memory 7 when explicitly needed. 8 """ 9 10 DEPARTMENT_CHOICES = ( 11 ('05',u'Antioquia'), 12 ('08',u'Atlántico'), 13 ('11',u'Bogotá'), 14 ('13',u'Bolívar'), 15 ('15',u'Boyacá'), 16 ('17',u'Caldas'), 17 ('18',u'Caquetá'), 18 ('19',u'Cauca'), 19 ('20',u'Cesar'), 20 ('23',u'Córdoba'), 21 ('25',u'Cundinamarca'), 22 ('27',u'Chocó'), 23 ('41',u'Huila'), 24 ('44',u'La Guajira'), 25 ('47',u'Magdalena'), 26 ('50',u'Meta'), 27 ('52',u'Nariño'), 28 ('54',u'Norte De Santander'), 29 ('63',u'Quindío'), 30 ('66',u'Risaralda'), 31 ('68',u'Santander'), 32 ('70',u'Sucre'), 33 ('73',u'Tolima'), 34 ('76',u'Valle Del Cauca'), 35 ('81',u'Arauca'), 36 ('85',u'Casanare'), 37 ('86',u'Putumayo'), 38 ('88',u'San Andrés'), 39 ('91',u'Amazonas'), 40 ('94',u'Guainía'), 41 ('95',u'Guavire'), 42 ('97',u'Vaupés'), 43 ('99',u'Vichada'), 44 ) -
tests/regressiontests/forms/tests.py
10 10 from localflavor.ca import tests as localflavor_ca_tests 11 11 from localflavor.ch import tests as localflavor_ch_tests 12 12 from localflavor.cl import tests as localflavor_cl_tests 13 from localflavor.co import tests as localflavor_co_tests 13 14 from localflavor.de import tests as localflavor_de_tests 15 from localflavor.ec import tests as localflavor_ec_tests 14 16 from localflavor.es import tests as localflavor_es_tests 15 17 from localflavor.fi import tests as localflavor_fi_tests 16 18 from localflavor.fr import tests as localflavor_fr_tests … … 43 45 'localflavor_ca_tests': localflavor_ca_tests, 44 46 'localflavor_ch_tests': localflavor_ch_tests, 45 47 'localflavor_cl_tests': localflavor_cl_tests, 48 'localflavor_co_tests': localflavor_co_tests, 46 49 'localflavor_de_tests': localflavor_de_tests, 50 'localflavor_ec_tests': localflavor_ec_tests, 47 51 'localflavor_es_tests': localflavor_es_tests, 48 52 'localflavor_fi_tests': localflavor_fi_tests, 49 53 'localflavor_fr_tests': localflavor_fr_tests, -
docs/localflavor.txt
36 36 * Brazil_ 37 37 * Canada_ 38 38 * Chile_ 39 * Colombia_ 40 * Ecuador_ 39 41 * Finland_ 40 42 * France_ 41 43 * Germany_ … … 75 77 .. _Brazil: `Brazil (django.contrib.localflavor.br)`_ 76 78 .. _Canada: `Canada (django.contrib.localflavor.ca)`_ 77 79 .. _Chile: `Chile (django.contrib.localflavor.cl)`_ 80 .. _Colombia: `Colombia (django.contrib.localflavor.co)`_ 81 .. _Ecuador: `Ecuador (django.contrib.localflavor.ec)`_ 78 82 .. _Finland: `Finland (django.contrib.localflavor.fi)`_ 79 83 .. _France: `France (django.contrib.localflavor.fr)`_ 80 84 .. _Germany: `Germany (django.contrib.localflavor.de)`_ … … 244 248 A ``Select`` widget that uses a list of Chilean regions (Regiones) as its 245 249 choices. 246 250 251 Colombia (``django.contrib.localflavor.co``) 252 ============================================ 253 254 CoDepartmentSelect 255 ------------- 256 257 A ``Select`` widget that uses a list of Colombian departments as its choices. 258 259 260 Ecuador (``django.contrib.localflavor.ec``) 261 =========================================== 262 263 EcProvinceSelect 264 ------------- 265 266 A ``Select`` widget that uses a list of Ecuatorian provinces as its choices. 267 247 268 Finland (``django.contrib.localflavor.fi``) 248 269 =========================================== 249 270