Skip to content

Commit da164cf

Browse files
committed
Use 'TextChoices' for countries
1 parent bb295f3 commit da164cf

2 files changed

Lines changed: 597 additions & 261 deletions

File tree

Lines changed: 337 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,337 @@
1+
# Generated by Django 4.1 on 2022-08-25 02:01
2+
3+
from django.db import migrations, models
4+
5+
6+
class Migration(migrations.Migration):
7+
8+
dependencies = [
9+
("community_db", "0001_initial"),
10+
]
11+
12+
operations = [
13+
migrations.AlterField(
14+
model_name="person",
15+
name="country",
16+
field=models.CharField(
17+
blank=True,
18+
choices=[
19+
("Afghanistan", "Afghanistan"),
20+
("Albania", "Albania"),
21+
("Algeria", "Algeria"),
22+
("American Samoa", "American Samoa"),
23+
("Andorra", "Andorra"),
24+
("Angola", "Angola"),
25+
("Anguilla", "Anguilla"),
26+
("Antarctica", "Antarctica"),
27+
("Antigua and Barbuda", "Antigua and Barbuda"),
28+
("Argentina", "Argentina"),
29+
("Armenia", "Armenia"),
30+
("Aruba", "Aruba"),
31+
("Australia", "Australia"),
32+
("Austria", "Austria"),
33+
("Azerbaijan", "Azerbaijan"),
34+
("Bahamas (the)", "Bahamas (the)"),
35+
("Bahrain", "Bahrain"),
36+
("Bangladesh", "Bangladesh"),
37+
("Barbados", "Barbados"),
38+
("Belarus", "Belarus"),
39+
("Belgium", "Belgium"),
40+
("Belize", "Belize"),
41+
("Benin", "Benin"),
42+
("Bermuda", "Bermuda"),
43+
("Bhutan", "Bhutan"),
44+
(
45+
"Bolivia (Plurinational State of)",
46+
"Bolivia (Plurinational State of)",
47+
),
48+
(
49+
"Bonaire, Sint Eustatius and Saba",
50+
"Bonaire, Sint Eustatius and Saba",
51+
),
52+
("Bosnia and Herzegovina", "Bosnia and Herzegovina"),
53+
("Botswana", "Botswana"),
54+
("Bouvet Island", "Bouvet Island"),
55+
("Brazil", "Brazil"),
56+
(
57+
"British Indian Ocean Territory (the)",
58+
"British Indian Ocean Territory (the)",
59+
),
60+
("Brunei Darussalam", "Brunei Darussalam"),
61+
("Bulgaria", "Bulgaria"),
62+
("Burkina Faso", "Burkina Faso"),
63+
("Burundi", "Burundi"),
64+
("Cabo Verde", "Cabo Verde"),
65+
("Cambodia", "Cambodia"),
66+
("Cameroon", "Cameroon"),
67+
("Canada", "Canada"),
68+
("Cayman Islands (the)", "Cayman Islands (the)"),
69+
(
70+
"Central African Republic (the)",
71+
"Central African Republic (the)",
72+
),
73+
("Chad", "Chad"),
74+
("Chile", "Chile"),
75+
("China", "China"),
76+
("Christmas Island", "Christmas Island"),
77+
("Cocos (Keeling) Islands (the)", "Cocos (Keeling) Islands (the)"),
78+
("Colombia", "Colombia"),
79+
("Comoros (the)", "Comoros (the)"),
80+
(
81+
"Congo (the Democratic Republic of the)",
82+
"Congo (the Democratic Republic of the)",
83+
),
84+
("Congo (the)", "Congo (the)"),
85+
("Cook Islands (the)", "Cook Islands (the)"),
86+
("Costa Rica", "Costa Rica"),
87+
("Croatia", "Croatia"),
88+
("Cuba", "Cuba"),
89+
("Curaçao", "Curaçao"),
90+
("Cyprus", "Cyprus"),
91+
("Czechia", "Czechia"),
92+
("Côte d'Ivoire", "Côte d'Ivoire"),
93+
("Denmark", "Denmark"),
94+
("Djibouti", "Djibouti"),
95+
("Dominica", "Dominica"),
96+
("Dominican Republic (the)", "Dominican Republic (the)"),
97+
("Ecuador", "Ecuador"),
98+
("Egypt", "Egypt"),
99+
("El Salvador", "El Salvador"),
100+
("Equatorial Guinea", "Equatorial Guinea"),
101+
("Eritrea", "Eritrea"),
102+
("Estonia", "Estonia"),
103+
("Eswatini", "Eswatini"),
104+
("Ethiopia", "Ethiopia"),
105+
(
106+
"Falkland Islands (the) [Malvinas]",
107+
"Falkland Islands (the) [Malvinas]",
108+
),
109+
("Faroe Islands (the)", "Faroe Islands (the)"),
110+
("Fiji", "Fiji"),
111+
("Finland", "Finland"),
112+
("France", "France"),
113+
("French Guiana", "French Guiana"),
114+
("French Polynesia", "French Polynesia"),
115+
(
116+
"French Southern Territories (the)",
117+
"French Southern Territories (the)",
118+
),
119+
("Gabon", "Gabon"),
120+
("Gambia (the)", "Gambia (the)"),
121+
("Georgia", "Georgia"),
122+
("Germany", "Germany"),
123+
("Ghana", "Ghana"),
124+
("Gibraltar", "Gibraltar"),
125+
("Greece", "Greece"),
126+
("Greenland", "Greenland"),
127+
("Grenada", "Grenada"),
128+
("Guadeloupe", "Guadeloupe"),
129+
("Guam", "Guam"),
130+
("Guatemala", "Guatemala"),
131+
("Guernsey", "Guernsey"),
132+
("Guinea", "Guinea"),
133+
("Guinea-Bissau", "Guinea-Bissau"),
134+
("Guyana", "Guyana"),
135+
("Haiti", "Haiti"),
136+
(
137+
"Heard Island and McDonald Islands",
138+
"Heard Island and McDonald Islands",
139+
),
140+
("Holy See (the)", "Holy See (the)"),
141+
("Honduras", "Honduras"),
142+
("Hong Kong", "Hong Kong"),
143+
("Hungary", "Hungary"),
144+
("Iceland", "Iceland"),
145+
("India", "India"),
146+
("Indonesia", "Indonesia"),
147+
("Iran (Islamic Republic of)", "Iran (Islamic Republic of)"),
148+
("Iraq", "Iraq"),
149+
("Ireland", "Ireland"),
150+
("Isle of Man", "Isle of Man"),
151+
("Israel", "Israel"),
152+
("Italy", "Italy"),
153+
("Jamaica", "Jamaica"),
154+
("Japan", "Japan"),
155+
("Jersey", "Jersey"),
156+
("Jordan", "Jordan"),
157+
("Kazakhstan", "Kazakhstan"),
158+
("Kenya", "Kenya"),
159+
("Kiribati", "Kiribati"),
160+
(
161+
"Korea (the Democratic People's Republic of)",
162+
"Korea (the Democratic People's Republic of)",
163+
),
164+
("Korea (the Republic of)", "Korea (the Republic of)"),
165+
("Kuwait", "Kuwait"),
166+
("Kyrgyzstan", "Kyrgyzstan"),
167+
(
168+
"Lao People's Democratic Republic (the)",
169+
"Lao People's Democratic Republic (the)",
170+
),
171+
("Latvia", "Latvia"),
172+
("Lebanon", "Lebanon"),
173+
("Lesotho", "Lesotho"),
174+
("Liberia", "Liberia"),
175+
("Libya", "Libya"),
176+
("Liechtenstein", "Liechtenstein"),
177+
("Lithuania", "Lithuania"),
178+
("Luxembourg", "Luxembourg"),
179+
("Macao", "Macao"),
180+
("Madagascar", "Madagascar"),
181+
("Malawi", "Malawi"),
182+
("Malaysia", "Malaysia"),
183+
("Maldives", "Maldives"),
184+
("Mali", "Mali"),
185+
("Malta", "Malta"),
186+
("Marshall Islands (the)", "Marshall Islands (the)"),
187+
("Martinique", "Martinique"),
188+
("Mauritania", "Mauritania"),
189+
("Mauritius", "Mauritius"),
190+
("Mayotte", "Mayotte"),
191+
("Mexico", "Mexico"),
192+
(
193+
"Micronesia (Federated States of)",
194+
"Micronesia (Federated States of)",
195+
),
196+
("Moldova (the Republic of)", "Moldova (the Republic of)"),
197+
("Monaco", "Monaco"),
198+
("Mongolia", "Mongolia"),
199+
("Montenegro", "Montenegro"),
200+
("Montserrat", "Montserrat"),
201+
("Morocco", "Morocco"),
202+
("Mozambique", "Mozambique"),
203+
("Myanmar", "Myanmar"),
204+
("Namibia", "Namibia"),
205+
("Nauru", "Nauru"),
206+
("Nepal", "Nepal"),
207+
("Netherlands (the)", "Netherlands (the)"),
208+
("New Caledonia", "New Caledonia"),
209+
("New Zealand", "New Zealand"),
210+
("Nicaragua", "Nicaragua"),
211+
("Niger (the)", "Niger (the)"),
212+
("Nigeria", "Nigeria"),
213+
("Niue", "Niue"),
214+
("Norfolk Island", "Norfolk Island"),
215+
(
216+
"Northern Mariana Islands (the)",
217+
"Northern Mariana Islands (the)",
218+
),
219+
("Norway", "Norway"),
220+
("Oman", "Oman"),
221+
("Pakistan", "Pakistan"),
222+
("Palau", "Palau"),
223+
("Palestine, State of", "Palestine, State of"),
224+
("Panama", "Panama"),
225+
("Papua New Guinea", "Papua New Guinea"),
226+
("Paraguay", "Paraguay"),
227+
("Peru", "Peru"),
228+
("Philippines (the)", "Philippines (the)"),
229+
("Pitcairn", "Pitcairn"),
230+
("Poland", "Poland"),
231+
("Portugal", "Portugal"),
232+
("Puerto Rico", "Puerto Rico"),
233+
("Qatar", "Qatar"),
234+
("Republic of North Macedonia", "Republic of North Macedonia"),
235+
("Romania", "Romania"),
236+
("Russian Federation (the)", "Russian Federation (the)"),
237+
("Rwanda", "Rwanda"),
238+
("Réunion", "Réunion"),
239+
("Saint Barthélemy", "Saint Barthélemy"),
240+
(
241+
"Saint Helena, Ascension and Tristan da Cunha",
242+
"Saint Helena, Ascension and Tristan da Cunha",
243+
),
244+
("Saint Kitts and Nevis", "Saint Kitts and Nevis"),
245+
("Saint Lucia", "Saint Lucia"),
246+
("Saint Martin (French part)", "Saint Martin (French part)"),
247+
("Saint Pierre and Miquelon", "Saint Pierre and Miquelon"),
248+
(
249+
"Saint Vincent and the Grenadines",
250+
"Saint Vincent and the Grenadines",
251+
),
252+
("Samoa", "Samoa"),
253+
("San Marino", "San Marino"),
254+
("Sao Tome and Principe", "Sao Tome and Principe"),
255+
("Saudi Arabia", "Saudi Arabia"),
256+
("Senegal", "Senegal"),
257+
("Serbia", "Serbia"),
258+
("Seychelles", "Seychelles"),
259+
("Sierra Leone", "Sierra Leone"),
260+
("Singapore", "Singapore"),
261+
("Sint Maarten (Dutch part)", "Sint Maarten (Dutch part)"),
262+
("Slovakia", "Slovakia"),
263+
("Slovenia", "Slovenia"),
264+
("Solomon Islands", "Solomon Islands"),
265+
("Somalia", "Somalia"),
266+
("South Africa", "South Africa"),
267+
(
268+
"South Georgia and the South Sandwich Islands",
269+
"South Georgia and the South Sandwich Islands",
270+
),
271+
("South Sudan", "South Sudan"),
272+
("Spain", "Spain"),
273+
("Sri Lanka", "Sri Lanka"),
274+
("Sudan (the)", "Sudan (the)"),
275+
("Suriname", "Suriname"),
276+
("Svalbard and Jan Mayen", "Svalbard and Jan Mayen"),
277+
("Sweden", "Sweden"),
278+
("Switzerland", "Switzerland"),
279+
("Syrian Arab Republic", "Syrian Arab Republic"),
280+
("Taiwan (Province of China)", "Taiwan (Province of China)"),
281+
("Tajikistan", "Tajikistan"),
282+
("Tanzania, United Republic of", "Tanzania, United Republic of"),
283+
("Thailand", "Thailand"),
284+
("Timor-Leste", "Timor-Leste"),
285+
("Togo", "Togo"),
286+
("Tokelau", "Tokelau"),
287+
("Tonga", "Tonga"),
288+
("Trinidad and Tobago", "Trinidad and Tobago"),
289+
("Tunisia", "Tunisia"),
290+
("Turkey", "Turkey"),
291+
("Turkmenistan", "Turkmenistan"),
292+
(
293+
"Turks and Caicos Islands (the)",
294+
"Turks and Caicos Islands (the)",
295+
),
296+
("Tuvalu", "Tuvalu"),
297+
("Uganda", "Uganda"),
298+
("Ukraine", "Ukraine"),
299+
("United Arab Emirates (the)", "United Arab Emirates (the)"),
300+
(
301+
"United Kingdom of Great Britain and Northern Ireland (the)",
302+
"United Kingdom of Great Britain and Northern Ireland (the)",
303+
),
304+
(
305+
"United States Minor Outlying Islands (the)",
306+
"United States Minor Outlying Islands (the)",
307+
),
308+
(
309+
"United States of America (the)",
310+
"United States of America (the)",
311+
),
312+
("Uruguay", "Uruguay"),
313+
("Uzbekistan", "Uzbekistan"),
314+
("Vanuatu", "Vanuatu"),
315+
(
316+
"Venezuela (Bolivarian Republic of)",
317+
"Venezuela (Bolivarian Republic of)",
318+
),
319+
("Viet Nam", "Viet Nam"),
320+
("Virgin Islands (British)", "Virgin Islands (British)"),
321+
("Virgin Islands (U.S.)", "Virgin Islands (U.S.)"),
322+
("Wallis and Futuna", "Wallis and Futuna"),
323+
("Western Sahara", "Western Sahara"),
324+
("Yemen", "Yemen"),
325+
("Zambia", "Zambia"),
326+
("Zimbabwe", "Zimbabwe"),
327+
("Åland Islands", "Åland Islands"),
328+
],
329+
max_length=100,
330+
),
331+
),
332+
migrations.AlterField(
333+
model_name="person",
334+
name="last_name",
335+
field=models.CharField(max_length=100),
336+
),
337+
]

0 commit comments

Comments
 (0)