Saleor Core: the high performance, composable, headless commerce API.
Python cartcheckoutcommercecomposablee-commerceecommercegraphqlheadlessheadless-commercemultichannelomsorder-managementpaymentspimpythonshopshopping-cartstore
Restore street_address_1 and street_address_2 fields
Artur Smęt28f3ab9b8630
diff --git a/saleor/userprofile/migrations/0007_auto_20161013_0633.py b/saleor/userprofile/migrations/0007_auto_20161013_0633.pydeleted file mode 100644index 9475833100..0000000000--- a/saleor/userprofile/migrations/0007_auto_20161013_0633.py+++ /dev/null@@ -1,35 +0,0 @@-# -*- coding: utf-8 -*--# Generated by Django 1.10.1 on 2016-10-13 11:33-from __future__ import unicode_literals--from django.db import migrations, models---class Migration(migrations.Migration):-- dependencies = [- ('userprofile', '0006_auto_20160829_0819'),- ]-- operations = [- migrations.AddField(- model_name='address',- name='sorting_code',- field=models.CharField(blank=True, max_length=128, verbose_name='sorting code'),- ),- migrations.AlterField(- model_name='address',- name='first_name',- field=models.CharField(blank=True, max_length=256, verbose_name='first name'),- ),- migrations.AlterField(- model_name='address',- name='last_name',- field=models.CharField(blank=True, max_length=256, verbose_name='last name'),- ),- migrations.AlterField(- model_name='address',- name='street_address_1',- field=models.TextField(blank=True, verbose_name='address'),- ),- ]diff --git a/saleor/userprofile/migrations/0008_auto_20161013_0901.py b/saleor/userprofile/migrations/0008_auto_20161013_0901.pydeleted file mode 100644index 779b83cb8a..0000000000--- a/saleor/userprofile/migrations/0008_auto_20161013_0901.py+++ /dev/null@@ -1,24 +0,0 @@-# -*- coding: utf-8 -*--# Generated by Django 1.10.1 on 2016-10-13 14:01-from __future__ import unicode_literals--from django.db import migrations---class Migration(migrations.Migration):-- dependencies = [- ('userprofile', '0007_auto_20161013_0633'),- ]-- operations = [- migrations.RenameField(- model_name='address',- old_name='street_address_1',- new_name='street_address',- ),- migrations.RemoveField(- model_name='address',- name='street_address_2',- ),- ]diff --git a/saleor/userprofile/models.py b/saleor/userprofile/models.pyindex 939f8cb97d..42d1a0e40d 100644--- a/saleor/userprofile/models.py+++ b/saleor/userprofile/models.py@@ -32,17 +32,20 @@ class AddressManager(models.Manager):@python_2_unicode_compatibleclass Address(models.Model):first_name = models.CharField(- pgettext_lazy('Address field', 'first name'),+ pgettext_lazy('Address field', 'given name'),max_length=256, blank=True)last_name = models.CharField(- pgettext_lazy('Address field', 'last name'),+ pgettext_lazy('Address field', 'family name'),max_length=256, blank=True)company_name = models.CharField(pgettext_lazy('Address field', 'company or organization'),max_length=256, blank=True)- street_address = models.TextField(+ street_address_1 = models.CharField(pgettext_lazy('Address field', 'address'),- blank=True)+ 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, blank=True)@@ -60,11 +63,6 @@ class Address(models.Model):phone = models.CharField(pgettext_lazy('Address field', 'phone number'),max_length=30, blank=True)- sorting_code = models.CharField(- pgettext_lazy('Address field', 'sorting code'),- max_length=128, blank=True- )-objects = AddressManager()@property