diff --git a/cartridge/shop/migrations/0010_alter_discountcode_categories_and_more.py b/cartridge/shop/migrations/0010_alter_discountcode_categories_and_more.py new file mode 100644 index 00000000..e016022e --- /dev/null +++ b/cartridge/shop/migrations/0010_alter_discountcode_categories_and_more.py @@ -0,0 +1,61 @@ +# Generated by Django 4.0.4 on 2022-05-04 12:24 + +from django.db import migrations, models + + +class Migration(migrations.Migration): + + dependencies = [ + ("shop", "0009_product_slug"), + ] + + operations = [ + migrations.AlterField( + model_name="discountcode", + name="categories", + field=models.ManyToManyField( + blank=True, + related_name="%(class)s_related", + to="shop.category", + verbose_name="Categories", + ), + ), + migrations.AlterField( + model_name="order", + name="billing_detail_state", + field=models.CharField( + blank=True, max_length=100, verbose_name="State/Region" + ), + ), + migrations.AlterField( + model_name="order", + name="shipping_detail_state", + field=models.CharField( + blank=True, max_length=100, verbose_name="State/Region" + ), + ), + migrations.AlterField( + model_name="product", + name="related_products", + field=models.ManyToManyField( + blank=True, to="shop.product", verbose_name="Related products" + ), + ), + migrations.AlterField( + model_name="product", + name="upsell_products", + field=models.ManyToManyField( + blank=True, to="shop.product", verbose_name="Upsell products" + ), + ), + migrations.AlterField( + model_name="sale", + name="categories", + field=models.ManyToManyField( + blank=True, + related_name="%(class)s_related", + to="shop.category", + verbose_name="Categories", + ), + ), + ] diff --git a/cartridge/shop/models.py b/cartridge/shop/models.py index 5fb7c4d9..b10b978a 100644 --- a/cartridge/shop/models.py +++ b/cartridge/shop/models.py @@ -453,7 +453,7 @@ class Order(SiteRelated): billing_detail_last_name = CharField(_("Last name"), max_length=100) billing_detail_street = CharField(_("Street"), max_length=100) billing_detail_city = CharField(_("City/Suburb"), max_length=100) - billing_detail_state = CharField(_("State/Region"), max_length=100) + billing_detail_state = CharField(_("State/Region"), max_length=100, blank=True) billing_detail_postcode = CharField(_("Zip/Postcode"), max_length=10) billing_detail_country = CharField(_("Country"), max_length=100) billing_detail_phone = CharField(_("Phone"), max_length=20) @@ -462,7 +462,7 @@ class Order(SiteRelated): shipping_detail_last_name = CharField(_("Last name"), max_length=100) shipping_detail_street = CharField(_("Street"), max_length=100) shipping_detail_city = CharField(_("City/Suburb"), max_length=100) - shipping_detail_state = CharField(_("State/Region"), max_length=100) + shipping_detail_state = CharField(_("State/Region"), max_length=100, blank=True) shipping_detail_postcode = CharField(_("Zip/Postcode"), max_length=10) shipping_detail_country = CharField(_("Country"), max_length=100) shipping_detail_phone = CharField(_("Phone"), max_length=20)