Skip to content

Saleor Core: the high performance, composable, headless commerce API.

Don't require city and street address

Michał Ociepka54721f399575
diff --git a/saleor/userprofile/migrations/0004_auto_20151209_0643.py b/saleor/userprofile/migrations/0004_auto_20151209_0643.py
new file mode 100644
index 0000000000..7b0b33b84e
--- /dev/null
+++ b/saleor/userprofile/migrations/0004_auto_20151209_0643.py
@@ -0,0 +1,44 @@
+# -*- coding: utf-8 -*-
+from __future__ import unicode_literals
+
+from django.db import models, migrations
+
+
+class Migration(migrations.Migration):
+
+ dependencies = [
+ ('userprofile', '0003_auto_20151104_1102'),
+ ]
+
+ operations = [
+ migrations.AlterField(
+ model_name='address',
+ name='city',
+ field=models.CharField(max_length=256, verbose_name='city', blank=True),
+ ),
+ migrations.AlterField(
+ model_name='address',
+ name='city_area',
+ field=models.CharField(max_length=128, verbose_name='district', blank=True),
+ ),
+ migrations.AlterField(
+ model_name='address',
+ name='company_name',
+ field=models.CharField(max_length=256, verbose_name='company or organization', blank=True),
+ ),
+ migrations.AlterField(
+ model_name='address',
+ name='country_area',
+ field=models.CharField(max_length=128, verbose_name='state or province', blank=True),
+ ),
+ migrations.AlterField(
+ model_name='address',
+ name='street_address_1',
+ field=models.CharField(max_length=256, verbose_name='address', blank=True),
+ ),
+ migrations.AlterField(
+ model_name='address',
+ name='street_address_2',
+ field=models.CharField(max_length=256, verbose_name='address', blank=True),
+ ),
+ ]
diff --git a/saleor/userprofile/models.py b/saleor/userprofile/models.py
index 63ab84de26..443b8a9865 100644
--- a/saleor/userprofile/models.py
+++ b/saleor/userprofile/models.py
@@ -43,13 +43,13 @@ class Address(models.Model):
max_length=256, blank=True)
street_address_1 = models.CharField(
pgettext_lazy('Address field', 'address'),
- max_length=256)
+ max_length=256, blank=True)
street_address_2 = models.CharField(
pgettext_lazy('Address field', 'address'),
max_length=256, blank=True)
city = models.CharField(
pgettext_lazy('Address field', 'city'),
- max_length=256)
+ max_length=256, blank=True)
city_area = models.CharField(
pgettext_lazy('Address field', 'district'),
max_length=128, blank=True)