app/django/contrib/localflavor/in_/in_states.py
changeset 54 03e267d67478
equal deleted inserted replaced
53:57b4279d8c4e 54:03e267d67478
       
     1 """
       
     2 A mapping of state misspellings/abbreviations to normalized abbreviations, and
       
     3 an alphabetical list of states for use as `choices` in a formfield.
       
     4 
       
     5 This exists in this standalone file so that it's only imported into memory
       
     6 when explicitly needed.
       
     7 """
       
     8 
       
     9 STATE_CHOICES = (
       
    10     'KA', 'Karnataka',
       
    11     'AP', 'Andhra Pradesh',
       
    12     'KL', 'Kerala',
       
    13     'TN', 'Tamil Nadu',
       
    14     'MH', 'Maharashtra',
       
    15     'UP', 'Uttar Pradesh',
       
    16     'GA', 'Goa',
       
    17     'GJ', 'Gujarat',
       
    18     'RJ', 'Rajasthan',
       
    19     'HP', 'Himachal Pradesh',
       
    20     'JK', 'Jammu and Kashmir',
       
    21     'AR', 'Arunachal Pradesh',
       
    22     'AS', 'Assam',
       
    23     'BR', 'Bihar',
       
    24     'CG', 'Chattisgarh',
       
    25     'HR', 'Haryana',
       
    26     'JH', 'Jharkhand',
       
    27     'MP', 'Madhya Pradesh',
       
    28     'MN', 'Manipur',
       
    29     'ML', 'Meghalaya',
       
    30     'MZ', 'Mizoram',
       
    31     'NL', 'Nagaland',
       
    32     'OR', 'Orissa',
       
    33     'PB', 'Punjab',
       
    34     'SK', 'Sikkim',
       
    35     'TR', 'Tripura',
       
    36     'UA', 'Uttarakhand',
       
    37     'WB', 'West Bengal',
       
    38 
       
    39     # Union Territories
       
    40     'AN', 'Andaman and Nicobar',
       
    41     'CH', 'Chandigarh',
       
    42     'DN', 'Dadra and Nagar Haveli',
       
    43     'DD', 'Daman and Diu',
       
    44     'DL', 'Delhi',
       
    45     'LD', 'Lakshadweep',
       
    46     'PY', 'Pondicherry',
       
    47 )
       
    48 
       
    49 STATES_NORMALIZED = {
       
    50     'ka': 'KA',
       
    51     'karnatka': 'KA',
       
    52     'tn': 'TN',
       
    53     'tamilnad': 'TN',
       
    54     'tamilnadu': 'TN',
       
    55     'andra pradesh': 'AP',
       
    56     'andrapradesh': 'AP',
       
    57     'andhrapradesh': 'AP',
       
    58     'maharastra': 'MH',
       
    59     'mh': 'MH',
       
    60     'ap': 'AP',
       
    61     'dl': 'DL',
       
    62     'dd': 'DD',
       
    63     'br': 'BR',
       
    64     'ar': 'AR',
       
    65     'sk': 'SK',
       
    66     'kl': 'KL',
       
    67     'ga': 'GA',
       
    68     'rj': 'RJ',
       
    69     'rajastan': 'RJ',
       
    70     'rajasthan': 'RJ',
       
    71     'hp': 'HP',
       
    72     'ua': 'UA',
       
    73     'up': 'UP',
       
    74     'mp': 'MP',
       
    75     'mz': 'MZ',
       
    76     'bengal': 'WB',
       
    77     'westbengal': 'WB',
       
    78     'mizo': 'MZ',
       
    79     'orisa': 'OR',
       
    80     'odisa': 'OR',
       
    81     'or': 'OR',
       
    82     'ar': 'AR',
       
    83 }
       
    84