Saleor Core: the high performance, composable, headless commerce API.
Python cartcheckoutcommercecomposablee-commerceecommercegraphqlheadlessheadless-commercemultichannelomsorder-managementpaymentspimpythonshopshopping-cartstore
Add support for Kosovo country (#17898)
Krzysztof Żuraw8d83fc04de59
diff --git a/saleor/account/tests/test_account.py b/saleor/account/tests/test_account.pyindex 36507eaddd..4ad2203364 100644--- a/saleor/account/tests/test_account.py+++ b/saleor/account/tests/test_account.py@@ -14,7 +14,8 @@ from ..models import Userfrom ..validators import validate_possible_number[email protected]("country", ["CN", "PL", "US", "IE"])+# Don't remove `XK` from the list of countries, it is override defined in saleor.settings.COUNTRIES_OVERRIDE.[email protected]("country", ["CN", "PL", "US", "IE", "XK"])def test_address_form_for_country(country):# givendata = {diff --git a/saleor/discount/migrations/0086_alter_voucher_countries.py b/saleor/discount/migrations/0086_alter_voucher_countries.pynew file mode 100644index 0000000000..b78f7c25a2--- /dev/null+++ b/saleor/discount/migrations/0086_alter_voucher_countries.py@@ -0,0 +1,20 @@+# Generated by Django 4.2.20 on 2025-06-30 12:26++import django_countries.fields+from django.db import migrations+++class Migration(migrations.Migration):+ dependencies = [+ ("discount", "0085_alter_checkoutdiscount_amount_value_and_more"),+ ]++ operations = [+ migrations.AlterField(+ model_name="voucher",+ name="countries",+ field=django_countries.fields.CountryField(+ blank=True, max_length=752, multiple=True+ ),+ ),+ ]diff --git a/saleor/discount/migrations/0087_merge_20250630_1332.py b/saleor/discount/migrations/0087_merge_20250630_1332.pynew file mode 100644index 0000000000..a6d477a952--- /dev/null+++ b/saleor/discount/migrations/0087_merge_20250630_1332.py@@ -0,0 +1,12 @@+# Generated by Django 5.2.1 on 2025-06-30 13:32++from django.db import migrations+++class Migration(migrations.Migration):+ dependencies = [+ ("discount", "0086_alter_voucher_countries"),+ ("discount", "0086_merge_20250527_1210"),+ ]++ operations = []diff --git a/saleor/graphql/schema.graphql b/saleor/graphql/schema.graphqlindex e87c8c4a7c..b4f82bdf57 100644--- a/saleor/graphql/schema.graphql+++ b/saleor/graphql/schema.graphql@@ -5006,6 +5006,7 @@ enum CountryCode {KZKEKI+ XKKWKGLAdiff --git a/saleor/settings.py b/saleor/settings.pyindex f7fc06cae9..964ca6551e 100644--- a/saleor/settings.py+++ b/saleor/settings.py@@ -471,7 +471,16 @@ DEFAULT_CURRENCY_CODE_LENGTH = 3# Following the recommendation of https://tools.ietf.org/html/rfc5322#section-2.1.1DEFAULT_MAX_EMAIL_DISPLAY_NAME_LENGTH = 78-COUNTRIES_OVERRIDE = {"EU": "European Union"}+COUNTRIES_OVERRIDE = {+ "EU": "European Union",+ "XK": {+ "name": "Kosovo",+ "alpha3": "XXK",+ "ioc_code": "KOS",+ "numeric": "383",+ "numeric_padded": "0383",+ },+}MAX_USER_ADDRESSES = int(os.environ.get("MAX_USER_ADDRESSES", 100))diff --git a/saleor/shipping/migrations/0036_alter_shippingzone_countries.py b/saleor/shipping/migrations/0036_alter_shippingzone_countries.pynew file mode 100644index 0000000000..e5547e952b--- /dev/null+++ b/saleor/shipping/migrations/0036_alter_shippingzone_countries.py@@ -0,0 +1,23 @@+# Generated by Django 4.2.20 on 2025-06-30 12:26++import django_countries.fields+from django.db import migrations+++class Migration(migrations.Migration):+ dependencies = [+ (+ "shipping",+ "0035_alter_shippingmethodchannellisting_maximum_order_price_amount_and_more",+ ),+ ]++ operations = [+ migrations.AlterField(+ model_name="shippingzone",+ name="countries",+ field=django_countries.fields.CountryField(+ blank=True, default=[], max_length=752, multiple=True+ ),+ ),+ ]diff --git a/saleor/shipping/migrations/0037_merge_20250630_1332.py b/saleor/shipping/migrations/0037_merge_20250630_1332.pynew file mode 100644index 0000000000..04f6caba36--- /dev/null+++ b/saleor/shipping/migrations/0037_merge_20250630_1332.py@@ -0,0 +1,12 @@+# Generated by Django 5.2.1 on 2025-06-30 13:32++from django.db import migrations+++class Migration(migrations.Migration):+ dependencies = [+ ("shipping", "0036_alter_shippingzone_countries"),+ ("shipping", "0036_merge_20250527_1210"),+ ]++ operations = []