Ticket #13050: localflavor.bd.diff

File localflavor.bd.diff, 21.6 KB (added by nsmgr8, 5 years ago)
  • django/contrib/localflavor/bd/bd_divisions.py

     
     1"""
     2List of Bangladesh Divisions, Districts and Upazilas/Thanas.
     3"""
     4
     5from django.utils.translation import ugettext_lazy as _
     6
     7
     8# Reference: http://www.statoids.com/ubd.html
     9
     10DIVISION_CHOICES = (
     11    ('BD.BA', _('Barisal')),
     12    ('BD.CG', _('Chittagong')),
     13    ('BD.DA', _('Dhaka')),
     14    ('BD.KH', _('Khulna')),
     15    ('BD.RS', _('Rajshahi')),
     16    ('BD.RP', _('Rangpur')),
     17    ('BD.SY', _('Sylhet')),
     18)
     19
     20# Reference: http://www.statoids.com/ybd.html
     21
     22DISTRICT_CHOICES = (
     23    ('BD.KH.BH', _('Bagerhat')),
     24    ('BD.CG.BD', _('Bandarban')),
     25    ('BD.BA.BG', _('Barguna')),
     26    ('BD.BA.BS', _('Barisal')),
     27    ('BD.BA.BL', _('Bhola')),
     28    ('BD.RS.BO', _('Bogra')),
     29    ('BD.CG.BB', _('Brahmanbaria')),
     30    ('BD.CG.CP', _('Chandpur')),
     31    ('BD.CG.CT', _('Chittagong')),
     32    ('BD.KH.CD', _('Chuadanga')),
     33    ('BD.CG.CM', _('Comilla')),
     34    ('BD.CG.CB', _("Cox's Bazar")),
     35    ('BD.DA.DH', _('Dhaka')),
     36    ('BD.RP.DJ', _('Dinajpur')),
     37    ('BD.DA.FR', _('Faridpur')),
     38    ('BD.CG.FN', _('Feni')),
     39    ('BD.RP.GB', _('Gaibandha')),
     40    ('BD.DA.GZ', _('Gazipur')),
     41    ('BD.DA.GG', _('Gopalganj')),
     42    ('BD.SY.HA', _('Habiganj')),
     43    ('BD.RS.JP', _('Jaipurhat')),
     44    ('BD.DA.JM', _('Jamalpur')),
     45    ('BD.KH.JS', _('Jessore')),
     46    ('BD.BA.JK', _('Jhalakati')),
     47    ('BD.KH.JN', _('Jhenaidah')),
     48    ('BD.CG.KG', _('Khagrachari')),
     49    ('BD.KH.KL', _('Khulna')),
     50    ('BD.DA.KS', _('Kishoreganj')),
     51    ('BD.RP.KR', _('Kurigram')),
     52    ('BD.KH.KU', _('Kushtia')),
     53    ('BD.CG.LK', _('Lakshmipur')),
     54    ('BD.RP.LL', _('Lalmonirhat')),
     55    ('BD.DA.MD', _('Madaripur')),
     56    ('BD.KH.MG', _('Magura')),
     57    ('BD.DA.MK', _('Manikganj')),
     58    ('BD.KH.ME', _('Meherpur')),
     59    ('BD.SY.MB', _('Moulvibazar')),
     60    ('BD.DA.MU', _('Munshiganj')),
     61    ('BD.DA.MM', _('Mymensingh')),
     62    ('BD.RS.NA', _('Naogaon')),
     63    ('BD.KH.NR', _('Narail')),
     64    ('BD.DA.NY', _('Narayanganj')),
     65    ('BD.DA.NS', _('Narsingdi')),
     66    ('BD.RS.NT', _('Natore')),
     67    ('BD.RS.NW', _('Nawabganj')),
     68    ('BD.DA.NK', _('Netrakona')),
     69    ('BD.RP.NP', _('Nilphamari')),
     70    ('BD.CG.NO', _('Noakhali')),
     71    ('BD.RS.PB', _('Pabna')),
     72    ('BD.RP.PN', _('Panchagarh')),
     73    ('BD.CG.PC', _('Parbattya Chattagram')),
     74    ('BD.BA.PT', _('Patuakhali')),
     75    ('BD.BA.PR', _('Pirojpur')),
     76    ('BD.DA.RB', _('Rajbari')),
     77    ('BD.RS.RS', _('Rajshahi')),
     78    ('BD.RP.RP', _('Rangpur')),
     79    ('BD.KH.ST', _('Satkhira')),
     80    ('BD.DA.SA', _('Shariatpur')),
     81    ('BD.DA.SP', _('Sherpur')),
     82    ('BD.RS.SR', _('Sirajganj')),
     83    ('BD.SY.SN', _('Sunamganj')),
     84    ('BD.SY.SL', _('Sylhet')),
     85    ('BD.DA.TA', _('Tangail')),
     86    ('BD.RP.TH', _('Thakurgaon')),
     87)
     88
     89# Reference: http://www.pmo.gov.bd/pmolib/maps/index.html
     90
     91UPAZILA_CHOICES = (
     92    ('000', _('Abhaynagar')),
     93    ('001', _('Adamdighi')),
     94    ('002', _('Aditmari')),
     95    ('003', _('Agailjhara')),
     96    ('004', _('Ajmiriganj')),
     97    ('005', _('Akhaura')),
     98    ('006', _('Akkelpur')),
     99    ('007', _('Alamdanga')),
     100    ('008', _('Ali Kadam')),
     101    ('009', _('Amtali')),
     102    ('010', _('Anwara')),
     103    ('011', _('Araihazar')),
     104    ('012', _('Ashuganj')),
     105    ('013', _('Astagram')),
     106    ('014', _('Atgharia')),
     107    ('015', _('Atpara')),
     108    ('016', _('Atrai')),
     109    ('017', _('Atwari')),
     110    ('018', _('Babuganj')),
     111    ('019', _('Badalgachhi')),
     112    ('020', _('Badarganj')),
     113    ('021', _('Badda Thana')),
     114    ('022', _('Bagaichhari')),
     115    ('023', _('Bagatipara')),
     116    ('024', _('Bagerhat Sadar')),
     117    ('025', _('Bagha')),
     118    ('026', _('Bagherpara')),
     119    ('027', _('Bagmara')),
     120    ('028', _('Bahubal')),
     121    ('029', _('Bajitpur')),
     122    ('030', _('Bakerganj')),
     123    ('031', _('Baksiganj')),
     124    ('032', _('Balaganj')),
     125    ('033', _('Baliadangi')),
     126    ('034', _('Baliakandi')),
     127    ('035', _('Bamna')),
     128    ('036', _('Banaripara')),
     129    ('037', _('Bancharampur')),
     130    ('038', _('Bandar')),
     131    ('039', _('Bandarban Sadar')),
     132    ('040', _('Baniyachong')),
     133    ('041', _('Banshkhali')),
     134    ('042', _('Baraigram')),
     135    ('043', _('Barguna Sadar')),
     136    ('044', _('Barhatta')),
     137    ('045', _('Barisal Sadar')),
     138    ('046', _('Barkal')),
     139    ('047', _('Barlekha')),
     140    ('048', _('Barura')),
     141    ('049', _('Basail')),
     142    ('050', _('Batiaghata')),
     143    ('051', _('Bauphal')),
     144    ('052', _('Beanibazar')),
     145    ('053', _('Begumganj')),
     146    ('054', _('Belabo')),
     147    ('055', _('Belaichhari')),
     148    ('056', _('Belkuchi')),
     149    ('057', _('Bera')),
     150    ('058', _('Betagi')),
     151    ('059', _('Bhairab')),
     152    ('060', _('Bhaluka')),
     153    ('061', _('Bhandaria')),
     154    ('062', _('Bhangura')),
     155    ('063', _('Bhedarganj')),
     156    ('064', _('Bheramara')),
     157    ('065', _('Bhola Sadar')),
     158    ('066', _('Bholahat')),
     159    ('067', _('Bhuapur')),
     160    ('068', _('Bhurungamari')),
     161    ('069', _('Biral')),
     162    ('070', _('Birampur')),
     163    ('071', _('Birganj')),
     164    ('072', _('Bishwamvarpur')),
     165    ('073', _('Biswanath')),
     166    ('074', _('Boalia Thana')),
     167    ('075', _('Boalkhali')),
     168    ('076', _('Bochaganj')),
     169    ('077', _('Boda')),
     170    ('078', _('Bogra Sadar')),
     171    ('079', _('Brahmanbaria Sadar')),
     172    ('080', _('Brahmanpara')),
     173    ('081', _('Burhanuddin')),
     174    ('082', _('Burichong')),
     175    ('083', _('Cantonnent Thana')),
     176    ('084', _('Chakaria')),
     177    ('085', _('Chandanaish')),
     178    ('086', _('Chandina')),
     179    ('087', _('Chandpur Sadar')),
     180    ('088', _('Char Fasson')),
     181    ('089', _('Char Rajibpur')),
     182    ('090', _('Charghat')),
     183    ('091', _('Chatkhil')),
     184    ('092', _('Chatmohar')),
     185    ('093', _('Chauddagram')),
     186    ('094', _('Chaugachha')),
     187    ('095', _('Chauhali')),
     188    ('096', _('Chhagalnaiya')),
     189    ('097', _('Chhatak')),
     190    ('098', _('Chilmari')),
     191    ('099', _('Chirirbandar')),
     192    ('100', _('Chitalmari')),
     193    ('101', _('Chuadanga Sadar')),
     194    ('102', _('Chunarughat')),
     195    ('103', _('Comilla Sadar')),
     196    ('104', _('Companiganj')),
     197    ('105', _('Companiganj, Noakhali')),
     198    ('106', _("Cox's Bazar Sadar")),
     199    ('107', _('Dacope')),
     200    ('108', _('Daganbhuiyan')),
     201    ('109', _('Damudya')),
     202    ('110', _('Damurhuda')),
     203    ('111', _('Dasmina')),
     204    ('112', _('Daudkandi')),
     205    ('113', _('Daulatkhan')),
     206    ('114', _('Daulatpur')),
     207    ('115', _('Daulatpur, Kushtia')),
     208    ('116', _('Daulatpur Thana')),
     209    ('117', _('Debiganj')),
     210    ('118', _('Delduar')),
     211    ('119', _('Demra Thana')),
     212    ('120', _('Derai')),
     213    ('121', _('Devidwar')),
     214    ('122', _('Dewanganj')),
     215    ('123', _('Dhamoirhat')),
     216    ('124', _('Dhamrai')),
     217    ('125', _('Dhanbari')),
     218    ('126', _('Dhanmandi Thana')),
     219    ('127', _('Dharampasha')),
     220    ('128', _('Dhobaura')),
     221    ('129', _('Dhunat')),
     222    ('130', _('Dighalia')),
     223    ('131', _('Dighinala')),
     224    ('132', _('Dimla')),
     225    ('133', _('Dinajpur Sadar')),
     226    ('134', _('Dohar')),
     227    ('135', _('Domar')),
     228    ('136', _('Dowarabazar')),
     229    ('137', _('Dumuria')),
     230    ('138', _('Dupchanchia')),
     231    ('139', _('Durgapur')),
     232    ('140', _('Durgapur, Rajshahi')),
     233    ('141', _('Fakirhat')),
     234    ('142', _('Faridganj')),
     235    ('143', _('Faridpur')),
     236    ('144', _('Fatikchhari')),
     237    ('145', _('Fenchuganj')),
     238    ('146', _('Feni Sadar')),
     239    ('147', _('Fulgazi')),
     240    ('148', _('Gabtali')),
     241    ('149', _('Gaffargaon')),
     242    ('150', _('Gaibandha Sadar')),
     243    ('151', _('Galachipa')),
     244    ('152', _('Gangachhara')),
     245    ('153', _('Gangni')),
     246    ('154', _('Gauripur')),
     247    ('155', _('Gaurnadi')),
     248    ('156', _('Gazaria')),
     249    ('157', _('Gazipur Sadar')),
     250    ('158', _('Ghatail')),
     251    ('159', _('Ghior')),
     252    ('160', _('Ghoraghat')),
     253    ('161', _('Goalandaghat')),
     254    ('162', _('Gobindaganj')),
     255    ('163', _('Godagari')),
     256    ('164', _('Golapganj')),
     257    ('165', _('Gomastapur')),
     258    ('166', _('Gopalganj Sadar')),
     259    ('167', _('Gopalpur')),
     260    ('168', _('Gosairhat')),
     261    ('169', _('Gowainghat')),
     262    ('170', _('Gulshan Thana')),
     263    ('171', _('Gurudaspur')),
     264    ('172', _('Habiganj Sadar')),
     265    ('173', _('Haimchar')),
     266    ('174', _('Hakimpur')),
     267    ('175', _('Haluaghat')),
     268    ('176', _('Harinakunda')),
     269    ('177', _('Haripur')),
     270    ('178', _('Harirampur')),
     271    ('179', _('Hathazari')),
     272    ('180', _('Hatibandha')),
     273    ('181', _('Hatiya')),
     274    ('182', _('Hazaribagh Thana')),
     275    ('183', _('Haziganj')),
     276    ('184', _('Hizla')),
     277    ('185', _('Homna')),
     278    ('186', _('Hossainpur')),
     279    ('187', _('Ishwardi')),
     280    ('188', _('Ishwarganj')),
     281    ('189', _('Islampur')),
     282    ('190', _('Itna')),
     283    ('191', _('Jagannathpur')),
     284    ('192', _('Jaintiapur')),
     285    ('193', _('Jaldhaka')),
     286    ('194', _('Jamalganj')),
     287    ('195', _('Jamalpur Sadar')),
     288    ('196', _('Jessore Sadar')),
     289    ('197', _('Jhalokati Sadar')),
     290    ('198', _('Jhenaidah Sadar')),
     291    ('199', _('Jhenaigati')),
     292    ('200', _('Jhikargachha')),
     293    ('201', _('Jibannagar')),
     294    ('202', _('Joypurhat Sadar')),
     295    ('203', _('Juraichhari')),
     296    ('204', _('Juri')),
     297    ('205', _('Kachua')),
     298    ('206', _('Kachua, Bagerhat')),
     299    ('207', _('Kafrul Thana')),
     300    ('208', _('Kahaloo')),
     301    ('209', _('Kaharole')),
     302    ('210', _('Kalai')),
     303    ('211', _('Kalapara')),
     304    ('212', _('Kalia')),
     305    ('213', _('Kaliakair')),
     306    ('214', _('Kaliganj, Gazipur')),
     307    ('215', _('Kaliganj, Jhenaidah')),
     308    ('216', _('Kaliganj, Lalmonirhat')),
     309    ('217', _('Kalihati')),
     310    ('218', _('Kalkini')),
     311    ('219', _('Kalmakanda')),
     312    ('220', _('Kamalganj')),
     313    ('221', _('Kamarkhanda')),
     314    ('222', _('Kamrangir Char')),
     315    ('223', _('Kanaighat')),
     316    ('224', _('Kapasia')),
     317    ('225', _('Kaptai')),
     318    ('226', _('Karimganj')),
     319    ('227', _('Kasba')),
     320    ('228', _('Kashiani')),
     321    ('229', _('Kathalia')),
     322    ('230', _('Katiadi')),
     323    ('231', _('Kaunia')),
     324    ('232', _('Kawkhali')),
     325    ('233', _('Kawkhali (Betbunia)')),
     326    ('234', _('Kazipur')),
     327    ('235', _('Kendua')),
     328    ('236', _('Keraniganj  (Dhaka)')),
     329    ('237', _('Khagrachhari')),
     330    ('238', _('Khaliajuri')),
     331    ('239', _('Khalishpur Thana')),
     332    ('240', _('Khanjahan Ali Thana')),
     333    ('241', _('Khansama')),
     334    ('242', _('Khetlal')),
     335    ('243', _('Khilgaon Thana')),
     336    ('244', _('Khoksa')),
     337    ('245', _('Kishoreganj')),
     338    ('246', _('Kishoreganj Sadar')),
     339    ('247', _('Komolnagor')),
     340    ('248', _('Kotalipara')),
     341    ('249', _('Kotchandpur')),
     342    ('250', _('Kotoali Thana')),
     343    ('251', _('Kotwali Thana')),
     344    ('252', _('Koyra')),
     345    ('253', _('Kulaura')),
     346    ('254', _('Kuliarchar')),
     347    ('255', _('Kumarkhali')),
     348    ('256', _('Kurigram Sadar')),
     349    ('257', _('Kushtia Sadar')),
     350    ('258', _('Kutubdia')),
     351    ('259', _('Lakhai')),
     352    ('260', _('Laksam')),
     353    ('261', _('Lakshmichhari')),
     354    ('262', _('Lakshmipur Sadar')),
     355    ('263', _('Lalbagh Thana')),
     356    ('264', _('Lalmohan')),
     357    ('265', _('Lalmonirhat Sadar')),
     358    ('266', _('Lalpur')),
     359    ('267', _('Lama')),
     360    ('268', _('Langadu')),
     361    ('269', _('Lohaganj')),
     362    ('270', _('Lohagara')),
     363    ('271', _('Lohagara, Narail')),
     364    ('272', _('Madan')),
     365    ('273', _('Madarganj')),
     366    ('274', _('Madaripur Sadar')),
     367    ('275', _('Madhabpur')),
     368    ('276', _('Madhupur')),
     369    ('277', _('Magura Sadar')),
     370    ('278', _('Mahadevpur')),
     371    ('279', _('Mahalchhari')),
     372    ('280', _('Maheshkhali')),
     373    ('281', _('Maheshpur')),
     374    ('282', _('Manda')),
     375    ('283', _('Manikchhari')),
     376    ('284', _('Manikganj Sadar')),
     377    ('285', _('Manirampur')),
     378    ('286', _('Mannerchar')),
     379    ('287', _('Manpura')),
     380    ('288', _('Mathbaria')),
     381    ('289', _('Matihar Thana')),
     382    ('290', _('Matiranga')),
     383    ('291', _('Matlab')),
     384    ('292', _('Matlab Uttor')),
     385    ('293', _('Maulvibazar Sadar')),
     386    ('294', _('Mehendiganj')),
     387    ('295', _('Meherpur Sadar')),
     388    ('296', _('Melandaha')),
     389    ('297', _('Mirpur')),
     390    ('298', _('Mirpur Thana')),
     391    ('299', _('Mirsharai')),
     392    ('300', _('Mirzaganj')),
     393    ('301', _('Mirzapur')),
     394    ('302', _('Mithamain')),
     395    ('303', _('Mithapukur')),
     396    ('304', _('Mohammadpur')),
     397    ('305', _('Mohammadpur Thana')),
     398    ('306', _('Mohanganj')),
     399    ('307', _('Mohanpur')),
     400    ('308', _('Mollahat')),
     401    ('309', _('Mongla')),
     402    ('310', _('Monohardi')),
     403    ('311', _('Morrelganj')),
     404    ('312', _('Motijheel Thana')),
     405    ('313', _('Mujibnagar')),
     406    ('314', _('Muksudpur')),
     407    ('315', _('Muktagachha')),
     408    ('316', _('Muladi')),
     409    ('317', _('Munshiganj Sadar')),
     410    ('318', _('Muradnagar')),
     411    ('319', _('Mymensingh Sadar')),
     412    ('320', _('Nabiganj')),
     413    ('321', _('Nabinagar')),
     414    ('322', _('Nachole')),
     415    ('323', _('Nagarpur')),
     416    ('324', _('Nageshwari')),
     417    ('325', _('Naikhongchhari')),
     418    ('326', _('Nakla')),
     419    ('327', _('Nalchity')),
     420    ('328', _('Nalitabari')),
     421    ('329', _('Nandail')),
     422    ('330', _('Nandigram')),
     423    ('331', _('Nangalkot')),
     424    ('332', _('Naogaon Sadar')),
     425    ('333', _('Narail Sadar')),
     426    ('334', _('Narayanganj Sadar')),
     427    ('335', _('Naria')),
     428    ('336', _('Narsingdi Sadar')),
     429    ('337', _('Nasirnagar')),
     430    ('338', _('Natore Sadar')),
     431    ('339', _('Nawabganj  (Dhaka)')),
     432    ('340', _('Nawabganj, Dinajpur')),
     433    ('341', _('Nawabganj Sadar')),
     434    ('342', _('Nazirpur')),
     435    ('343', _('Nesarabad (Swarupkati)')),
     436    ('344', _('Netrokona Sadar')),
     437    ('345', _('Niamatpur')),
     438    ('346', _('Nikli')),
     439    ('347', _('Nilphamari Sadar')),
     440    ('348', _('Noakhali Sadar')),
     441    ('349', _('Paba')),
     442    ('350', _('Pabna Sadar')),
     443    ('351', _('Paikgachha')),
     444    ('352', _('Pakundia')),
     445    ('353', _('Palash')),
     446    ('354', _('Palashbari')),
     447    ('355', _('Pallabi Thana')),
     448    ('356', _('Panchagarh Sadar')),
     449    ('357', _('Panchbibi')),
     450    ('358', _('Panchhari')),
     451    ('359', _('Pangsha')),
     452    ('360', _('Parbatipur')),
     453    ('361', _('Parshuram')),
     454    ('362', _('Patgram')),
     455    ('363', _('Patharghata')),
     456    ('364', _('Patiya')),
     457    ('365', _('Patnitala')),
     458    ('366', _('Patuakhali Sadar')),
     459    ('367', _('Phulbari, Dinajpur')),
     460    ('368', _('Phulbari, Kurigram')),
     461    ('369', _('Phulbari, Mymensingh')),
     462    ('370', _('Phulchhari')),
     463    ('371', _('Phulpur')),
     464    ('372', _('Phultoli')),
     465    ('373', _('Pirgachha')),
     466    ('374', _('Pirganj')),
     467    ('375', _('Pirganj, Thakurgaon')),
     468    ('376', _('Pirojpur Sadar')),
     469    ('377', _('Porsha')),
     470    ('378', _('Purbadhala Upazil')),
     471    ('379', _('Puthia')),
     472    ('380', _('Raiganj')),
     473    ('381', _('Raipur')),
     474    ('382', _('Raipura, Narsingdi')),
     475    ('383', _('Rajapur')),
     476    ('384', _('Rajarhat')),
     477    ('385', _('Rajasthali')),
     478    ('386', _('Rajbari Sadar')),
     479    ('387', _('Rajnagar')),
     480    ('388', _('Rajoir')),
     481    ('389', _('Rajpara Thana')),
     482    ('390', _('Ramganj')),
     483    ('391', _('Ramgarh')),
     484    ('392', _('Ramgati')),
     485    ('393', _('Ramna Thana')),
     486    ('394', _('Rampal')),
     487    ('395', _('Ramu')),
     488    ('396', _('Rangamati Sadar')),
     489    ('397', _('Rangpur Sadar')),
     490    ('398', _('Rangunia')),
     491    ('399', _('Raninagar')),
     492    ('400', _('Ranisankail')),
     493    ('401', _('Raomari')),
     494    ('402', _('Raozan')),
     495    ('403', _('Rowangchhari')),
     496    ('404', _('Rujganj')),
     497    ('405', _('Ruma')),
     498    ('406', _('Rupsha')),
     499    ('407', _('Sabujbagh Thana')),
     500    ('408', _('Sadullapur')),
     501    ('409', _('Sahajanpur')),
     502    ('410', _('Saidpur')),
     503    ('411', _('Sakhipur')),
     504    ('412', _('Sandwip')),
     505    ('413', _('Santhia')),
     506    ('414', _('Sapahar')),
     507    ('415', _('Sarail')),
     508    ('416', _('Sarankhola')),
     509    ('417', _('Sariakandi')),
     510    ('418', _('Sarishabari')),
     511    ('419', _('Satkania')),
     512    ('420', _('Saturia')),
     513    ('421', _('Savar  (Dhaka)')),
     514    ('422', _('Senbagh')),
     515    ('423', _('Shahjadpur')),
     516    ('424', _('Shahmokhdum Thana')),
     517    ('425', _('Shahrasti')),
     518    ('426', _('Shailkupa')),
     519    ('427', _('Shalikha')),
     520    ('428', _('Shampur Thana')),
     521    ('429', _('Shariatpur Sadar')),
     522    ('430', _('Sharsha')),
     523    ('431', _('Sherpur')),
     524    ('432', _('Sherpur Sadar')),
     525    ('433', _('Shibchar')),
     526    ('434', _('Shibganj')),
     527    ('435', _('Shibganj, Nawabganj')),
     528    ('436', _('Shibpur')),
     529    ('437', _('Shivalaya')),
     530    ('438', _('Singair')),
     531    ('439', _('Singra')),
     532    ('440', _('Sirajdikhan')),
     533    ('441', _('Sirajganj Sadar')),
     534    ('442', _('Sitakunda')),
     535    ('443', _('Sonadanga Thana')),
     536    ('444', _('Sonagazi')),
     537    ('445', _('Sonargaon')),
     538    ('446', _('Sonatala')),
     539    ('447', _('South Surma')),
     540    ('448', _('Sreebardi')),
     541    ('449', _('Sreemangal')),
     542    ('450', _('Sreenagar')),
     543    ('451', _('Sreepur')),
     544    ('452', _('Sreepur, Magura')),
     545    ('453', _('Sughatta')),
     546    ('454', _('Sujanagar')),
     547    ('455', _('Sullah')),
     548    ('456', _('Sunamganj Sadar')),
     549    ('457', _('Sundarganj')),
     550    ('458', _('Sutrapur Thana')),
     551    ('459', _('Sylhet Sadar')),
     552    ('460', _('Tahirpur')),
     553    ('461', _('Tangail Sadar')),
     554    ('462', _('Tanore')),
     555    ('463', _('Taraganj')),
     556    ('464', _('Tarail')),
     557    ('465', _('Tarash')),
     558    ('466', _('Tazumuddin')),
     559    ('467', _('Tejgaon Thana')),
     560    ('468', _('Teknaf')),
     561    ('469', _('Terokhada')),
     562    ('470', _('Tetulia')),
     563    ('471', _('Thakurgaon Sadar')),
     564    ('472', _('Thanchi')),
     565    ('473', _('Tongibari')),
     566    ('474', _('Trishal')),
     567    ('475', _('Tungipara')),
     568    ('476', _('Ukhia')),
     569    ('477', _('Ulipur')),
     570    ('478', _('Ullahpara')),
     571    ('479', _('Uttra Thana')),
     572    ('480', _('Wazirpur')),
     573    ('481', _('Zakiganj')),
     574    ('482', _('Zanjira')),
     575)
     576
  • django/contrib/localflavor/bd/forms.py

     
     1"""
     2Bangladesh-specific Form helpers
     3"""
     4
     5from django.core.validators import EMPTY_VALUES
     6from django.forms import ValidationError
     7from django.forms.fields import Field, RegexField, Select
     8from django.utils.encoding import smart_unicode
     9from django.utils.translation import ugettext_lazy as _
     10import re
     11
     12
     13class BDPostCodeField(RegexField):
     14    """Bangladesh post code field."""
     15    default_error_messages = {
     16        'invalid': _('Enter a 4 digit post code.'),
     17    }
     18
     19    def __init__(self, *args, **kwargs):
     20        super(BDPostCodeField, self).__init__(r'^\d{4}$',
     21            max_length=None, min_length=None, *args, **kwargs)
     22
     23class BDPhoneNumberField(Field):
     24    """Bangladesh phone number field."""
     25    PHONE_DIGITS_RE = re.compile(r'^(\d{8,13})$')
     26
     27    default_error_messages = {
     28        'invalid': _(u'Phone numbers must be between 8 to 13 digits.'),
     29    }
     30
     31    def clean(self, value):
     32        """
     33        Validate a phone number. Strips parentheses, whitespace and hyphens.
     34        """
     35        super(BDPhoneNumberField, self).clean(value)
     36        if value in EMPTY_VALUES:
     37            return u''
     38        value = re.sub('(\(|\)|\s+|-)', '', smart_unicode(value))
     39        phone_match = self.PHONE_DIGITS_RE.search(value)
     40        if phone_match:
     41            return u'%s' % phone_match.group(1)
     42        raise ValidationError(self.error_messages['invalid'])
     43
     44class BDDivisionSelect(Select):
     45    """
     46    A Select widget that uses a list of Bangladesh divisions as its choices.
     47    """
     48    def __init__(self, attrs=None):
     49        from bd_divisions import DIVISION_CHOICES
     50        super(BDDivisionSelect, self).__init__(attrs, choices=DIVISION_CHOICES)
     51
     52class BDDistrictSelect(Select):
     53    """
     54    A Select widget that uses a list of Bangladesh districts as its choices
     55    """
     56    def __init__(self, attrs=None):
     57        from bd_divisions import DISTRICT_CHOICES
     58        super(BDDistrictSelect, self).__init__(attrs, choices=DISTRICT_CHOICES)
     59
     60class BDUpazilaSelect(Select):
     61    """
     62    A Select widget that uses a list of Bangladesh upazilas as its choices.
     63    """
     64    def __init__(self, attrs=None):
     65        from bd_divisions import UPAZILLA_CHOICES
     66        super(BDUpazilaSelect, self).__init__(attrs, choices=UPAZILLA_CHOICES)
     67
  • AUTHORS

     
    507507    Cheng Zhang
    508508    Glenn Maynard <glenn@zewt.org>
    509509    bthomas
     510    M Nasimul Haque <nasim.haque@gmail.com>
    510511
    511512A big THANK YOU goes to:
    512513
  • docs/ref/contrib/localflavor.txt

     
    8787.. _Argentina: `Argentina (ar)`_
    8888.. _Australia: `Australia (au)`_
    8989.. _Austria: `Austria (at)`_
     90.. _Bangladesh: `Bangladesh (bd)`_
    9091.. _Brazil: `Brazil (br)`_
    9192.. _Canada: `Canada (ca)`_
    9293.. _Chile: `Chile (cl)`_
     
    184185
    185186    A form field that validates its input as an Austrian social security number.
    186187
     188Bangladesh (``bd``)
     189===================
     190
     191.. class:: bd.forms.BDPostCodeField
     192
     193    A form field that validates its input as a Bangladeshi post code (4 digits).
     194
     195.. class:: bd.forms.BDPhoneNumberField
     196
     197    A form field that validates input as a Bangladeshi phone number.
     198
     199.. class:: bd.forms.BDDivisionSelect
     200
     201    A ``Select`` widget that uses a list of Bangldesh divisions as its choices.
     202
     203.. class:: bd.forms.BDDistrictSelect
     204
     205    A ``Select`` widget that uses a list of Bangladesh districts as its choices.
     206
     207.. class:: bd.forms.BDUpazilaSelect
     208
     209    A ``Select`` widget that uses a list of Bangladesh upazilas as its choices.
     210
    187211Brazil (``br``)
    188212===============
    189213
Back to Top