|
| 1 | +""" |
| 2 | +List of Districts of Sri Lanka. |
| 3 | +
|
| 4 | +Source: https://en.wikipedia.org/wiki/Districts_of_Sri_Lanka |
| 5 | +
|
| 6 | +Sri Lanka districts list choices are in this format: |
| 7 | +
|
| 8 | + ('name_of_districts',_('Name of districts')), |
| 9 | +
|
| 10 | +eg. |
| 11 | + ('name_of_district', _('Name of district')), |
| 12 | +""" |
| 13 | + |
| 14 | +from django.utils.translation import gettext_lazy as _ |
| 15 | + |
| 16 | +# list of districts in Central |
| 17 | +CENTRAL_DISTRICTS = [ |
| 18 | + ('kandy', _('Kandy')), |
| 19 | + ('matale', _('Matale')), |
| 20 | + ('nuwara_eliya', _('Nuwara Eliya')), |
| 21 | +] |
| 22 | + |
| 23 | +# list of districts in North Central |
| 24 | +NORTH_CENTRAL_DISTRICTS = [ |
| 25 | + ('anuradhapura', _('Anuradhapura')), |
| 26 | + ('polonnaruwa', _('Polonnaruwa')), |
| 27 | +] |
| 28 | + |
| 29 | +# list of districts in Northern |
| 30 | +NORTHERN_DISTRICTS = [ |
| 31 | + ('jaffna', _('Jaffna')), |
| 32 | + ('kilinochchi', _('Kilinochchi')), |
| 33 | + ('mannar', _('Mannar')), |
| 34 | + ('vavuniya', _('Vavuniya')), |
| 35 | + ('mullativu', _('Mullativu')), |
| 36 | + ('alambil', _('Alambil')), |
| 37 | +] |
| 38 | + |
| 39 | +# list of districts in Eastern |
| 40 | +EASTERN_DISTRICTS = [ |
| 41 | + ('ampara', _('Ampara')), |
| 42 | + ('batticaloa', _('Batticaloa')), |
| 43 | + ('trincomalee', _('Trincomalee')), |
| 44 | +] |
| 45 | + |
| 46 | +# list of districts in North Western |
| 47 | +NORTH_WESTERN_DISTRICTS = [ |
| 48 | + ('kurunagala', _('Kurunagala')), |
| 49 | + ('puttalam', _('Puttalam')), |
| 50 | +] |
| 51 | + |
| 52 | +# list of districts in Southern |
| 53 | +SOUTHERN_DISTRICTS = [ |
| 54 | + ('galle', _('Galle')), |
| 55 | + ('hambanthota', _('Hambanthota')), |
| 56 | + ('mathara', _('Mathara')), |
| 57 | +] |
| 58 | + |
| 59 | +# list of districts in Uva |
| 60 | +UVA_DISTRICTS = [ |
| 61 | + ('badulla', _('Badulla')), |
| 62 | + ('monaragala', _('Monaragala')), |
| 63 | +] |
| 64 | + |
| 65 | +# list of districts in Sabaragamuwa |
| 66 | +SABARAGAMUWA_DISTRICTS = [ |
| 67 | + ('kegalle', _('Kegalle')), |
| 68 | + ('rathnapura', _('Rathnapura')), |
| 69 | +] |
| 70 | + |
| 71 | +# list of districts in Western |
| 72 | +WESTERN_DISTRICTS = [ |
| 73 | + ('colombo', _('Colombo')), |
| 74 | + ('gampaha', _('Gampaha')), |
| 75 | + ('kaluthara', _('Kaluthara')), |
| 76 | +] |
| 77 | + |
| 78 | +# Combining all the district lists from different provinces into a single list |
| 79 | +DISTRICTS = CENTRAL_DISTRICTS + NORTH_CENTRAL_DISTRICTS + NORTHERN_DISTRICTS + EASTERN_DISTRICTS + NORTH_WESTERN_DISTRICTS + SOUTHERN_DISTRICTS + UVA_DISTRICTS + SABARAGAMUWA_DISTRICTS + WESTERN_DISTRICTS |
| 80 | + |
| 81 | +# Alphabetically sorting the list of all districts based on their names (first element of each tuple) |
| 82 | +DISTRICTS.sort(key=lambda district: district[0]) |
0 commit comments