From 74ffc30d0dfc9a451423ff77686e1642de72eac8 Mon Sep 17 00:00:00 2001 From: batuhan Date: Wed, 31 Jan 2024 11:10:45 +0100 Subject: [PATCH] added serbia, kosovo, montenegro and curacao --- django_country_kit/data.py | 9 ++++++--- setup.py | 2 +- 2 files changed, 7 insertions(+), 4 deletions(-) diff --git a/django_country_kit/data.py b/django_country_kit/data.py index 3c3be67..f212f68 100644 --- a/django_country_kit/data.py +++ b/django_country_kit/data.py @@ -86,6 +86,7 @@ "CI": {"name": _("Cote D'Ivoire"), "alpha3": "CIV"}, "HR": {"name": _("Croatia"), "alpha3": "HRV"}, "CU": {"name": _("Cuba"), "alpha3": "CUB"}, + "CW": {"name": _("CuraƧao"), "alpha3": "CUW"}, "CY": {"name": _("Cyprus"), "alpha3": "CYP"}, "CZ": {"name": _("Czech Republic"), "alpha3": "CZE"}, "DK": {"name": _("Denmark"), "alpha3": "DNK"}, @@ -147,6 +148,7 @@ "KI": {"name": _("Kiribati"), "alpha3": "KIR"}, "KP": {"name": _("Korea, Democratic People's Republic of"), "alpha3": "PRK"}, "KR": {"name": _("Korea, Republic of"), "alpha3": "KOR"}, + "XK": {"name": _("Kosovo"), "alpha3": "XKX"}, "KW": {"name": _("Kuwait"), "alpha3": "KWT"}, "KG": {"name": _("Kyrgyzstan"), "alpha3": "KGZ"}, "LA": {"name": _("Lao People's Democratic Republic"), "alpha3": "LAO"}, @@ -176,6 +178,7 @@ "MD": {"name": _("Moldova, Republic of"), "alpha3": "MDA"}, "MC": {"name": _("Monaco"), "alpha3": "MCO"}, "MN": {"name": _("Mongolia"), "alpha3": "MNG"}, + "ME": {"name": _("Montenegro"), "alpha3": "MNE"}, "MS": {"name": _("Montserrat"), "alpha3": "MSR"}, "MA": {"name": _("Morocco"), "alpha3": "MAR"}, "MZ": {"name": _("Mozambique"), "alpha3": "MOZ"}, @@ -222,7 +225,7 @@ "ST": {"name": _("Sao Tome and Principe"), "alpha3": "STP"}, "SA": {"name": _("Saudi Arabia"), "alpha3": "SAU"}, "SN": {"name": _("Senegal"), "alpha3": "SEN"}, - "CS": {"name": _("Serbia and Montenegro"), "alpha3": "SCG"}, + "RS": {"name": _("Serbia"), "alpha3": "SRB"}, "SC": {"name": _("Seychelles"), "alpha3": "SYC"}, "SL": {"name": _("Sierra Leone"), "alpha3": "SLE"}, "SG": {"name": _("Singapore"), "alpha3": "SGP"}, @@ -291,6 +294,6 @@ def get_countries(): include_countries = getattr(settings, "INCLUDE_COUNTRIES", []) if include_countries: - countries = countries.update(include_countries) + countries = countries | include_countries - return countries + return dict(sorted(countries.items(), key=lambda x: x[1]['name'])) diff --git a/setup.py b/setup.py index 9f75842..f969407 100644 --- a/setup.py +++ b/setup.py @@ -14,7 +14,7 @@ setup( name='django-country-kit', - version="0.0.1", + version="0.0.2", author='Pescheck IT', author_email='devops@pescheck.io', description='Countries for django',