Saleor Core: the high performance, composable, headless commerce API.
Python cartcheckoutcommercecomposablee-commerceecommercegraphqlheadlessheadless-commercemultichannelomsorder-managementpaymentspimpythonshopshopping-cartstore
Rename userprofile app to account app
Anna Siwikd73c476e8ddc
diff --git a/saleor/userprofile/__init__.py b/saleor/account/__init__.pysimilarity index 100%rename from saleor/userprofile/__init__.pyrename to saleor/account/__init__.pydiff --git a/saleor/userprofile/forms.py b/saleor/account/forms.pysimilarity index 100%rename from saleor/userprofile/forms.pyrename to saleor/account/forms.pydiff --git a/saleor/userprofile/i18n.py b/saleor/account/i18n.pysimilarity index 100%rename from saleor/userprofile/i18n.pyrename to saleor/account/i18n.pydiff --git a/saleor/userprofile/impersonate.py b/saleor/account/impersonate.pysimilarity index 87%rename from saleor/userprofile/impersonate.pyrename to saleor/account/impersonate.pyindex e5cbfb3c63..470180b023 100644--- a/saleor/userprofile/impersonate.py+++ b/saleor/account/impersonate.py@@ -13,4 +13,4 @@ def can_impersonate(request):`django-impersonate` module requires a function as input argument,not just permission name."""- return request.user.has_perm('userprofile.impersonate_user')+ return request.user.has_perm('account.impersonate_user')diff --git a/saleor/userprofile/management/__init__.py b/saleor/account/management/__init__.pysimilarity index 100%rename from saleor/userprofile/management/__init__.pyrename to saleor/account/management/__init__.pydiff --git a/saleor/userprofile/management/commands/__init__.py b/saleor/account/management/commands/__init__.pysimilarity index 100%rename from saleor/userprofile/management/commands/__init__.pyrename to saleor/account/management/commands/__init__.pydiff --git a/saleor/userprofile/management/commands/changepassword.py b/saleor/account/management/commands/changepassword.pysimilarity index 100%rename from saleor/userprofile/management/commands/changepassword.pyrename to saleor/account/management/commands/changepassword.pydiff --git a/saleor/userprofile/management/commands/createsuperuser.py b/saleor/account/management/commands/createsuperuser.pysimilarity index 100%rename from saleor/userprofile/management/commands/createsuperuser.pyrename to saleor/account/management/commands/createsuperuser.pydiff --git a/saleor/userprofile/migrations/0001_initial.py b/saleor/account/migrations/0001_initial.pysimilarity index 98%rename from saleor/userprofile/migrations/0001_initial.pyrename to saleor/account/migrations/0001_initial.pyindex 149a7b4e0a..82540faaf5 100644--- a/saleor/userprofile/migrations/0001_initial.py+++ b/saleor/account/migrations/0001_initial.py@@ -48,17 +48,17 @@ class Migration(migrations.Migration):migrations.AddField(model_name='user',name='addresses',- field=models.ManyToManyField(to='userprofile.Address'),+ field=models.ManyToManyField(to='account.Address'),),migrations.AddField(model_name='user',name='default_billing_address',- field=models.ForeignKey(related_name='+', on_delete=django.db.models.deletion.SET_NULL, verbose_name='default billing address', blank=True, to='userprofile.Address', null=True),+ field=models.ForeignKey(related_name='+', on_delete=django.db.models.deletion.SET_NULL, verbose_name='default billing address', blank=True, to='account.Address', null=True),),migrations.AddField(model_name='user',name='default_shipping_address',- field=models.ForeignKey(related_name='+', on_delete=django.db.models.deletion.SET_NULL, verbose_name='default shipping address', blank=True, to='userprofile.Address', null=True),+ field=models.ForeignKey(related_name='+', on_delete=django.db.models.deletion.SET_NULL, verbose_name='default shipping address', blank=True, to='account.Address', null=True),),migrations.AddField(model_name='user',diff --git a/saleor/userprofile/migrations/0002_auto_20150907_0602.py b/saleor/account/migrations/0002_auto_20150907_0602.pysimilarity index 71%rename from saleor/userprofile/migrations/0002_auto_20150907_0602.pyrename to saleor/account/migrations/0002_auto_20150907_0602.pyindex 8ac775e484..85e33238cc 100644--- a/saleor/userprofile/migrations/0002_auto_20150907_0602.py+++ b/saleor/account/migrations/0002_auto_20150907_0602.py@@ -7,13 +7,13 @@ from django.db import models, migrationsclass Migration(migrations.Migration):dependencies = [- ('userprofile', '0001_initial'),+ ('account', '0001_initial'),]operations = [migrations.AlterField(model_name='user',name='addresses',- field=models.ManyToManyField(to='userprofile.Address', blank=True),+ field=models.ManyToManyField(to='account.Address', blank=True),),]diff --git a/saleor/userprofile/migrations/0003_auto_20151104_1102.py b/saleor/account/migrations/0003_auto_20151104_1102.pysimilarity index 91%rename from saleor/userprofile/migrations/0003_auto_20151104_1102.pyrename to saleor/account/migrations/0003_auto_20151104_1102.pyindex 7f563286b2..314c955805 100644--- a/saleor/userprofile/migrations/0003_auto_20151104_1102.py+++ b/saleor/account/migrations/0003_auto_20151104_1102.py@@ -7,7 +7,7 @@ from django.db import models, migrationsclass Migration(migrations.Migration):dependencies = [- ('userprofile', '0002_auto_20150907_0602'),+ ('account', '0002_auto_20150907_0602'),]operations = [diff --git a/saleor/userprofile/migrations/0004_auto_20160114_0419.py b/saleor/account/migrations/0004_auto_20160114_0419.pysimilarity index 90%rename from saleor/userprofile/migrations/0004_auto_20160114_0419.pyrename to saleor/account/migrations/0004_auto_20160114_0419.pyindex f0f9c3cb93..543bb90abd 100644--- a/saleor/userprofile/migrations/0004_auto_20160114_0419.py+++ b/saleor/account/migrations/0004_auto_20160114_0419.py@@ -9,7 +9,7 @@ import django_countries.fieldsclass Migration(migrations.Migration):dependencies = [- ('userprofile', '0003_auto_20151104_1102'),+ ('account', '0003_auto_20151104_1102'),]operations = [diff --git a/saleor/userprofile/migrations/0005_auto_20160205_0651.py b/saleor/account/migrations/0005_auto_20160205_0651.pysimilarity index 92%rename from saleor/userprofile/migrations/0005_auto_20160205_0651.pyrename to saleor/account/migrations/0005_auto_20160205_0651.pyindex 6f50a707ec..34c13ef6a2 100644--- a/saleor/userprofile/migrations/0005_auto_20160205_0651.py+++ b/saleor/account/migrations/0005_auto_20160205_0651.py@@ -8,7 +8,7 @@ from django.db import migrations, modelsclass Migration(migrations.Migration):dependencies = [- ('userprofile', '0004_auto_20160114_0419'),+ ('account', '0004_auto_20160114_0419'),]operations = [diff --git a/saleor/userprofile/migrations/0006_auto_20160829_0819.py b/saleor/account/migrations/0006_auto_20160829_0819.pysimilarity index 92%rename from saleor/userprofile/migrations/0006_auto_20160829_0819.pyrename to saleor/account/migrations/0006_auto_20160829_0819.pyindex 6fe664c82f..45c3934b38 100644--- a/saleor/userprofile/migrations/0006_auto_20160829_0819.py+++ b/saleor/account/migrations/0006_auto_20160829_0819.py@@ -8,7 +8,7 @@ from django.db import migrations, modelsclass Migration(migrations.Migration):dependencies = [- ('userprofile', '0005_auto_20160205_0651'),+ ('account', '0005_auto_20160205_0651'),]operations = [diff --git a/saleor/userprofile/migrations/0007_auto_20161115_0940.py b/saleor/account/migrations/0007_auto_20161115_0940.pysimilarity index 92%rename from saleor/userprofile/migrations/0007_auto_20161115_0940.pyrename to saleor/account/migrations/0007_auto_20161115_0940.pyindex 1491ecfe0a..58580b529d 100644--- a/saleor/userprofile/migrations/0007_auto_20161115_0940.py+++ b/saleor/account/migrations/0007_auto_20161115_0940.py@@ -8,7 +8,7 @@ from django.db import migrations, modelsclass Migration(migrations.Migration):dependencies = [- ('userprofile', '0006_auto_20160829_0819'),+ ('account', '0006_auto_20160829_0819'),]operations = [diff --git a/saleor/userprofile/migrations/0008_auto_20161115_1011.py b/saleor/account/migrations/0008_auto_20161115_1011.pysimilarity index 89%rename from saleor/userprofile/migrations/0008_auto_20161115_1011.pyrename to saleor/account/migrations/0008_auto_20161115_1011.pyindex 2fcd027b08..58358ea453 100644--- a/saleor/userprofile/migrations/0008_auto_20161115_1011.py+++ b/saleor/account/migrations/0008_auto_20161115_1011.py@@ -8,7 +8,7 @@ from django.db import migrations, modelsclass Migration(migrations.Migration):dependencies = [- ('userprofile', '0007_auto_20161115_0940'),+ ('account', '0007_auto_20161115_0940'),]operations = [diff --git a/saleor/userprofile/migrations/0009_auto_20170206_0407.py b/saleor/account/migrations/0009_auto_20170206_0407.pysimilarity index 84%rename from saleor/userprofile/migrations/0009_auto_20170206_0407.pyrename to saleor/account/migrations/0009_auto_20170206_0407.pyindex e4cc15e24c..2c72b2779e 100644--- a/saleor/userprofile/migrations/0009_auto_20170206_0407.py+++ b/saleor/account/migrations/0009_auto_20170206_0407.py@@ -8,7 +8,7 @@ from django.db import migrations, modelsclass Migration(migrations.Migration):dependencies = [- ('userprofile', '0008_auto_20161115_1011'),+ ('account', '0008_auto_20161115_1011'),]operations = [@@ -23,7 +23,7 @@ class Migration(migrations.Migration):migrations.AlterField(model_name='user',name='addresses',- field=models.ManyToManyField(blank=True, to='userprofile.Address', verbose_name='addresses'),+ field=models.ManyToManyField(blank=True, to='account.Address', verbose_name='addresses'),),migrations.AlterField(model_name='user',diff --git a/saleor/userprofile/migrations/0010_auto_20170919_0839.py b/saleor/account/migrations/0010_auto_20170919_0839.pysimilarity index 90%rename from saleor/userprofile/migrations/0010_auto_20170919_0839.pyrename to saleor/account/migrations/0010_auto_20170919_0839.pyindex e8b1e9f594..5a1683e39d 100644--- a/saleor/userprofile/migrations/0010_auto_20170919_0839.py+++ b/saleor/account/migrations/0010_auto_20170919_0839.py@@ -8,7 +8,7 @@ from django.db import migrationsclass Migration(migrations.Migration):dependencies = [- ('userprofile', '0009_auto_20170206_0407'),+ ('account', '0009_auto_20170206_0407'),]operations = [diff --git a/saleor/userprofile/migrations/0011_auto_20171110_0552.py b/saleor/account/migrations/0011_auto_20171110_0552.pysimilarity index 92%rename from saleor/userprofile/migrations/0011_auto_20171110_0552.pyrename to saleor/account/migrations/0011_auto_20171110_0552.pyindex fe7468e642..09dcec90c2 100644--- a/saleor/userprofile/migrations/0011_auto_20171110_0552.py+++ b/saleor/account/migrations/0011_auto_20171110_0552.py@@ -8,7 +8,7 @@ from django.db import migrationsclass Migration(migrations.Migration):dependencies = [- ('userprofile', '0010_auto_20170919_0839'),+ ('account', '0010_auto_20170919_0839'),]operations = [diff --git a/saleor/userprofile/migrations/0012_auto_20171117_0846.py b/saleor/account/migrations/0012_auto_20171117_0846.pysimilarity index 92%rename from saleor/userprofile/migrations/0012_auto_20171117_0846.pyrename to saleor/account/migrations/0012_auto_20171117_0846.pyindex ef55412b6a..b0e541bbed 100644--- a/saleor/userprofile/migrations/0012_auto_20171117_0846.py+++ b/saleor/account/migrations/0012_auto_20171117_0846.py@@ -8,7 +8,7 @@ from django.db import migrationsclass Migration(migrations.Migration):dependencies = [- ('userprofile', '0011_auto_20171110_0552'),+ ('account', '0011_auto_20171110_0552'),]operations = [diff --git a/saleor/userprofile/migrations/0013_auto_20171120_0521.py b/saleor/account/migrations/0013_auto_20171120_0521.pysimilarity index 91%rename from saleor/userprofile/migrations/0013_auto_20171120_0521.pyrename to saleor/account/migrations/0013_auto_20171120_0521.pyindex 77fd9c9477..25aa2be68a 100644--- a/saleor/userprofile/migrations/0013_auto_20171120_0521.py+++ b/saleor/account/migrations/0013_auto_20171120_0521.py@@ -9,7 +9,7 @@ import phonenumbersdef convert_phone_number_to_phonenumberfield(apps, schema_editor):- Address = apps.get_model("userprofile", "Address")+ Address = apps.get_model("account", "Address")for address in Address.objects.all():if address.phone:try:@@ -25,7 +25,7 @@ def convert_phone_number_to_phonenumberfield(apps, schema_editor):class Migration(migrations.Migration):dependencies = [- ('userprofile', '0012_auto_20171117_0846'),+ ('account', '0012_auto_20171117_0846'),]operations = [diff --git a/saleor/userprofile/migrations/0014_auto_20171129_1004.py b/saleor/account/migrations/0014_auto_20171129_1004.pysimilarity index 93%rename from saleor/userprofile/migrations/0014_auto_20171129_1004.pyrename to saleor/account/migrations/0014_auto_20171129_1004.pyindex 0d2a2dd2e3..9447590c11 100644--- a/saleor/userprofile/migrations/0014_auto_20171129_1004.py+++ b/saleor/account/migrations/0014_auto_20171129_1004.py@@ -8,7 +8,7 @@ from django.db import migrationsclass Migration(migrations.Migration):dependencies = [- ('userprofile', '0013_auto_20171120_0521'),+ ('account', '0013_auto_20171120_0521'),]operations = [diff --git a/saleor/userprofile/migrations/0015_auto_20171213_0734.py b/saleor/account/migrations/0015_auto_20171213_0734.pysimilarity index 60%rename from saleor/userprofile/migrations/0015_auto_20171213_0734.pyrename to saleor/account/migrations/0015_auto_20171213_0734.pyindex fa8d6a7bbb..de00b6adb2 100644--- a/saleor/userprofile/migrations/0015_auto_20171213_0734.py+++ b/saleor/account/migrations/0015_auto_20171213_0734.py@@ -3,19 +3,19 @@from __future__ import unicode_literalsfrom django.db import migrations-import saleor.userprofile.models+import saleor.account.modelsclass Migration(migrations.Migration):dependencies = [- ('userprofile', '0014_auto_20171129_1004'),+ ('account', '0014_auto_20171129_1004'),]operations = [migrations.AlterField(model_name='address',name='phone',- field=saleor.userprofile.models.PossiblePhoneNumberField(blank=True, default='', max_length=128, verbose_name='phone number'),+ field=saleor.account.models.PossiblePhoneNumberField(blank=True, default='', max_length=128, verbose_name='phone number'),),]diff --git a/saleor/userprofile/migrations/0016_auto_20180108_0814.py b/saleor/account/migrations/0016_auto_20180108_0814.pysimilarity index 88%rename from saleor/userprofile/migrations/0016_auto_20180108_0814.pyrename to saleor/account/migrations/0016_auto_20180108_0814.pyindex 2af2659a7e..b1b3d7ae6f 100644--- a/saleor/userprofile/migrations/0016_auto_20180108_0814.py+++ b/saleor/account/migrations/0016_auto_20180108_0814.py@@ -6,13 +6,13 @@ from django.db import migrations, modelsimport django.db.models.deletionimport django.utils.timezoneimport django_countries.fields-import saleor.userprofile.models+import saleor.account.modelsclass Migration(migrations.Migration):dependencies = [- ('userprofile', '0015_auto_20171213_0734'),+ ('account', '0015_auto_20171213_0734'),]operations = [@@ -54,7 +54,7 @@ class Migration(migrations.Migration):migrations.AlterField(model_name='address',name='phone',- field=saleor.userprofile.models.PossiblePhoneNumberField(blank=True, default='', max_length=128),+ field=saleor.account.models.PossiblePhoneNumberField(blank=True, default='', max_length=128),),migrations.AlterField(model_name='address',@@ -74,7 +74,7 @@ class Migration(migrations.Migration):migrations.AlterField(model_name='user',name='addresses',- field=models.ManyToManyField(blank=True, to='userprofile.Address'),+ field=models.ManyToManyField(blank=True, to='account.Address'),),migrations.AlterField(model_name='user',@@ -84,12 +84,12 @@ class Migration(migrations.Migration):migrations.AlterField(model_name='user',name='default_billing_address',- field=models.ForeignKey(blank=True, null=True, on_delete=django.db.models.deletion.SET_NULL, related_name='+', to='userprofile.Address'),+ field=models.ForeignKey(blank=True, null=True, on_delete=django.db.models.deletion.SET_NULL, related_name='+', to='account.Address'),),migrations.AlterField(model_name='user',name='default_shipping_address',- field=models.ForeignKey(blank=True, null=True, on_delete=django.db.models.deletion.SET_NULL, related_name='+', to='userprofile.Address'),+ field=models.ForeignKey(blank=True, null=True, on_delete=django.db.models.deletion.SET_NULL, related_name='+', to='account.Address'),),migrations.AlterField(model_name='user',diff --git a/saleor/userprofile/migrations/__init__.py b/saleor/account/migrations/__init__.pysimilarity index 100%rename from saleor/userprofile/migrations/__init__.pyrename to saleor/account/migrations/__init__.pydiff --git a/saleor/userprofile/models.py b/saleor/account/models.pysimilarity index 100%rename from saleor/userprofile/models.pyrename to saleor/account/models.pydiff --git a/saleor/userprofile/templatetags/__init__.py b/saleor/account/templatetags/__init__.pysimilarity index 100%rename from saleor/userprofile/templatetags/__init__.pyrename to saleor/account/templatetags/__init__.pydiff --git a/saleor/userprofile/templatetags/i18n_address_tags.py b/saleor/account/templatetags/i18n_address_tags.pysimilarity index 100%rename from saleor/userprofile/templatetags/i18n_address_tags.pyrename to saleor/account/templatetags/i18n_address_tags.pydiff --git a/saleor/userprofile/urls.py b/saleor/account/urls.pysimilarity index 100%rename from saleor/userprofile/urls.pyrename to saleor/account/urls.pydiff --git a/saleor/userprofile/utils.py b/saleor/account/utils.pysimilarity index 100%rename from saleor/userprofile/utils.pyrename to saleor/account/utils.pydiff --git a/saleor/userprofile/validators.py b/saleor/account/validators.pysimilarity index 100%rename from saleor/userprofile/validators.pyrename to saleor/account/validators.pydiff --git a/saleor/userprofile/views.py b/saleor/account/views.pysimilarity index 92%rename from saleor/userprofile/views.pyrename to saleor/account/views.pyindex b5304e9b05..374b105c09 100755--- a/saleor/userprofile/views.py+++ b/saleor/account/views.py@@ -22,7 +22,7 @@ def details(request):'orders': orders_paginated,'change_password_form': password_form}- return TemplateResponse(request, 'userprofile/details.html', ctx)+ return TemplateResponse(request, 'account/details.html', ctx)def get_or_process_password_form(request):@@ -48,7 +48,7 @@ def address_edit(request, pk):messages.success(request, message)return HttpResponseRedirect(reverse('profile:details') + '#addresses')return TemplateResponse(- request, 'userprofile/address_edit.html',+ request, 'account/address_edit.html',{'address_form': address_form})@@ -62,4 +62,4 @@ def address_delete(request, pk):pgettext('Storefront message', 'Address successfully removed'))return HttpResponseRedirect(reverse('profile:details') + '#addresses')return TemplateResponse(- request, 'userprofile/address_delete.html', {'address': address})+ request, 'account/address_delete.html', {'address': address})diff --git a/saleor/userprofile/widgets.py b/saleor/account/widgets.pysimilarity index 89%rename from saleor/userprofile/widgets.pyrename to saleor/account/widgets.pyindex dc4c6a6ff3..d6857861c7 100644--- a/saleor/userprofile/widgets.py+++ b/saleor/account/widgets.py@@ -14,7 +14,7 @@ class PhonePrefixWidget(PhoneNumberPrefixWidget):https://github.com/stefanfoulis/django-phonenumber-field/issues/82"""- template_name = 'userprofile/snippets/phone_prefix_widget.html'+ template_name = 'account/snippets/phone_prefix_widget.html'def __init__(self, attrs=None):widgets = (Select(attrs=attrs, choices=phone_prefixes), TextInput())@@ -23,7 +23,7 @@ class PhonePrefixWidget(PhoneNumberPrefixWidget):class DatalistTextWidget(Select):- template_name = "userprofile/snippets/datalist.html"+ template_name = "account/snippets/datalist.html"input_type = "text"def get_context(self, *args):diff --git a/saleor/checkout/core.py b/saleor/checkout/core.pyindex 30984a7cc2..97c3d04ed0 100644--- a/saleor/checkout/core.py+++ b/saleor/checkout/core.py@@ -16,8 +16,8 @@ from ..discount.models import NotApplicable, Voucherfrom ..discount.utils import increase_voucher_usagefrom ..order.models import Orderfrom ..shipping.models import ANY_COUNTRY, ShippingMethodCountry-from ..userprofile.models import Address-from ..userprofile.utils import store_user_address+from ..account.models import Address+from ..account.utils import store_user_addressSTORAGE_SESSION_KEY = 'checkout_storage'diff --git a/saleor/checkout/views/shipping.py b/saleor/checkout/views/shipping.pyindex f4fc30af6d..3c3da5ad14 100644--- a/saleor/checkout/views/shipping.py+++ b/saleor/checkout/views/shipping.py@@ -1,8 +1,8 @@from django.shortcuts import redirectfrom django.template.response import TemplateResponse-from ...userprofile.forms import get_address_form-from ...userprofile.models import Address+from ...account.forms import get_address_form+from ...account.models import Addressfrom ..forms import AnonymousUserShippingForm, ShippingAddressesFormdiff --git a/saleor/checkout/views/summary.py b/saleor/checkout/views/summary.pyindex f18e475c7c..36c0c34670 100644--- a/saleor/checkout/views/summary.py+++ b/saleor/checkout/views/summary.py@@ -4,8 +4,8 @@ from django.template.response import TemplateResponsefrom django.utils.translation import pgettext, pgettext_lazyfrom satchless.item import InsufficientStock-from ...userprofile.forms import get_address_form-from ...userprofile.models import Address+from ...account.forms import get_address_form+from ...account.models import Addressfrom ..forms import (AnonymousUserBillingForm, BillingAddressesForm,BillingWithoutShippingAddressForm, NoteForm)diff --git a/saleor/core/utils/__init__.py b/saleor/core/utils/__init__.pyindex ec0b7db1d9..330a346f37 100644--- a/saleor/core/utils/__init__.py+++ b/saleor/core/utils/__init__.py@@ -15,7 +15,7 @@ from django_prices_openexchangerates import exchange_currencyfrom geolite2 import geolite2from prices import PriceRange-from ...userprofile.models import User+from ...account.models import Usergeoreader = geolite2.reader()diff --git a/saleor/core/utils/random_data.py b/saleor/core/utils/random_data.pyindex 5478bfebee..a76ae48f25 100644--- a/saleor/core/utils/random_data.py+++ b/saleor/core/utils/random_data.py@@ -21,8 +21,8 @@ from ...product.models import (AttributeChoiceValue, Category, Collection, Product, ProductAttribute,ProductImage, ProductType, ProductVariant, Stock, StockLocation)from ...shipping.models import ANY_COUNTRY, ShippingMethod-from ...userprofile.models import Address, User-from ...userprofile.utils import store_user_address+from ...account.models import Address, User+from ...account.utils import store_user_addressfake = Factory.create()STOCK_LOCATION = 'default'diff --git a/saleor/core/views.py b/saleor/core/views.pyindex a67eb74ca1..ef3ae0c273 100644--- a/saleor/core/views.py+++ b/saleor/core/views.py@@ -7,7 +7,7 @@ from impersonate.views import impersonate as orig_impersonatefrom ..dashboard.views import staff_member_requiredfrom ..product.utils import products_for_homepage, products_with_availability-from ..userprofile.models import User+from ..account.models import Userfrom .utils.schema import get_webpage_schemadiff --git a/saleor/dashboard/customer/filters.py b/saleor/dashboard/customer/filters.pyindex c0f32eb8cf..3ad702b7ac 100644--- a/saleor/dashboard/customer/filters.py+++ b/saleor/dashboard/customer/filters.py@@ -5,7 +5,7 @@ from django_countries import countriesfrom django_filters import CharFilter, ChoiceFilter, OrderingFilterfrom ...core.filters import SortedFilterSet-from ...userprofile.models import User+from ...account.models import UserSORT_BY_FIELDS = (('email', 'email'),diff --git a/saleor/dashboard/customer/forms.py b/saleor/dashboard/customer/forms.pyindex 31acf87e19..0229456b77 100644--- a/saleor/dashboard/customer/forms.py+++ b/saleor/dashboard/customer/forms.py@@ -1,6 +1,6 @@from django import forms-from ...userprofile.models import User+from ...account.models import Userclass CustomerForm(forms.ModelForm):diff --git a/saleor/dashboard/customer/views.py b/saleor/dashboard/customer/views.pyindex eba1fc712b..020c88aa3b 100644--- a/saleor/dashboard/customer/views.py+++ b/saleor/dashboard/customer/views.py@@ -7,7 +7,7 @@ from django.template.response import TemplateResponsefrom django.utils.translation import pgettext_lazyfrom ...core.utils import get_paginator_items-from ...userprofile.models import User+from ...account.models import Userfrom ..emails import send_set_password_emailfrom ..views import staff_member_requiredfrom .filters import UserFilter@@ -15,7 +15,7 @@ from .forms import CustomerForm@staff_member_required-@permission_required('userprofile.view_user')+@permission_required('account.view_user')def customer_list(request):customers = (User.objects@@ -36,7 +36,7 @@ def customer_list(request):@staff_member_required-@permission_required('userprofile.view_user')+@permission_required('account.view_user')def customer_details(request, pk):queryset = User.objects.prefetch_related('orders', 'addresses').select_related(@@ -48,7 +48,7 @@ def customer_details(request, pk):@staff_member_required-@permission_required('userprofile.edit_user')+@permission_required('account.edit_user')def customer_create(request):customer = User()form = CustomerForm(request.POST or None, instance=customer)@@ -64,7 +64,7 @@ def customer_create(request):@staff_member_required-@permission_required('userprofile.edit_user')+@permission_required('account.edit_user')def customer_edit(request, pk=None):customer = get_object_or_404(User, pk=pk)form = CustomerForm(request.POST or None, instance=customer)diff --git a/saleor/dashboard/group/views.py b/saleor/dashboard/group/views.pyindex a4e40a84a9..62fd7401cb 100644--- a/saleor/dashboard/group/views.py+++ b/saleor/dashboard/group/views.py@@ -13,7 +13,7 @@ from .forms import GroupPermissionsForm@staff_member_required-@permission_required('userprofile.view_group')+@permission_required('account.view_group')def group_list(request):groups = (Group.objects.all().prefetch_related('permissions').order_by('name'))@@ -29,7 +29,7 @@ def group_list(request):@staff_member_required-@permission_required('userprofile.edit_group')+@permission_required('account.edit_group')def group_create(request):group = Group()form = GroupPermissionsForm(request.POST or None)@@ -43,7 +43,7 @@ def group_create(request):@staff_member_required-@permission_required('userprofile.edit_group')+@permission_required('account.edit_group')def group_details(request, pk):group = Group.objects.get(pk=pk)form = GroupPermissionsForm(request.POST or None, instance=group)@@ -58,7 +58,7 @@ def group_details(request, pk):@staff_member_required-@permission_required('userprofile.edit_group')+@permission_required('account.edit_group')def group_delete(request, pk):group = get_object_or_404(Group, pk=pk)if request.method == 'POST':diff --git a/saleor/dashboard/order/forms.py b/saleor/dashboard/order/forms.pyindex 89729c5ba2..f92026e850 100644--- a/saleor/dashboard/order/forms.py+++ b/saleor/dashboard/order/forms.py@@ -19,7 +19,7 @@ from ...order.utils import (recalculate_order, remove_empty_groups)from ...product.models import Product, ProductVariant, Stockfrom ...product.utils import allocate_stock, deallocate_stock-from ...userprofile.i18n import (+from ...account.i18n import (AddressForm as StorefrontAddressForm, PossiblePhoneNumberFormField)from ..forms import AjaxSelect2ChoiceFieldfrom ..widgets import PhonePrefixWidgetdiff --git a/saleor/dashboard/search/views.py b/saleor/dashboard/search/views.pyindex 74549ae382..cbb5bffe5c 100644--- a/saleor/dashboard/search/views.py+++ b/saleor/dashboard/search/views.py@@ -20,7 +20,7 @@ def get_results(request, form):users = results['users']if not user.has_perm('order.view_order'):orders = orders.none()- if not user.has_perm('userprofile.view_user'):+ if not user.has_perm('account.view_user'):users = users.none()return limit_results(products, orders, users)diff --git a/saleor/dashboard/staff/filters.py b/saleor/dashboard/staff/filters.pyindex 6a231d4044..a2988dc0d0 100644--- a/saleor/dashboard/staff/filters.py+++ b/saleor/dashboard/staff/filters.py@@ -2,7 +2,7 @@ from django.contrib.auth.models import Groupfrom django.utils.translation import npgettext, pgettext_lazyfrom django_filters import ModelMultipleChoiceFilter, OrderingFilter-from ...userprofile.models import User+from ...account.models import Userfrom ..customer.filters import UserFilterSORT_BY_FIELDS = (diff --git a/saleor/dashboard/staff/forms.py b/saleor/dashboard/staff/forms.pyindex 9aa9262960..d0e7347776 100644--- a/saleor/dashboard/staff/forms.py+++ b/saleor/dashboard/staff/forms.py@@ -1,7 +1,7 @@from django import formsfrom django.utils.translation import pgettext_lazy-from ...userprofile.models import User+from ...account.models import Userclass StaffForm(forms.ModelForm):diff --git a/saleor/dashboard/staff/views.py b/saleor/dashboard/staff/views.pyindex e742677473..38f2bf5fcb 100644--- a/saleor/dashboard/staff/views.py+++ b/saleor/dashboard/staff/views.py@@ -6,7 +6,7 @@ from django.template.response import TemplateResponsefrom django.utils.translation import pgettext_lazyfrom ...core.utils import get_paginator_items-from ...userprofile.models import User+from ...account.models import Userfrom ..emails import (send_promote_customer_to_staff_email, send_set_password_email)from ..views import staff_member_required@@ -16,7 +16,7 @@ from .utils import remove_staff_member@staff_member_required-@permission_required('userprofile.view_staff')+@permission_required('account.view_staff')def staff_list(request):staff_members = User.objects.filter(is_staff=True).prefetch_related('default_billing_address').order_by('email')@@ -31,7 +31,7 @@ def staff_list(request):@staff_member_required-@permission_required('userprofile.edit_staff')+@permission_required('account.edit_staff')def staff_details(request, pk):queryset = User.objects.filter(is_staff=True)staff_member = get_object_or_404(queryset, pk=pk)@@ -48,7 +48,7 @@ def staff_details(request, pk):@staff_member_required-@permission_required('userprofile.edit_staff')+@permission_required('account.edit_staff')def staff_create(request):try:staff = User.objects.get(email=request.POST.get('email'))@@ -72,7 +72,7 @@ def staff_create(request):@staff_member_required-@permission_required('userprofile.edit_staff')+@permission_required('account.edit_staff')def staff_delete(request, pk):queryset = User.objects.prefetch_related('orders')staff = get_object_or_404(queryset, pk=pk)diff --git a/saleor/dashboard/widgets.py b/saleor/dashboard/widgets.pyindex 470921fff6..58336c94af 100644--- a/saleor/dashboard/widgets.py+++ b/saleor/dashboard/widgets.py@@ -4,7 +4,7 @@ from django.forms import Textareafrom django_filters.widgets import RangeWidgetfrom django_prices.widgets import PriceInput-from ..userprofile.widgets import (+from ..account.widgets import (PhonePrefixWidget as StorefrontPhonePrefixWidget)diff --git a/saleor/order/migrations/0001_initial.py b/saleor/order/migrations/0001_initial.pyindex 64bf138f29..7ee075d380 100644--- a/saleor/order/migrations/0001_initial.py+++ b/saleor/order/migrations/0001_initial.py@@ -15,7 +15,7 @@ class Migration(migrations.Migration):dependencies = [migrations.swappable_dependency(settings.AUTH_USER_MODEL),('product', '0001_initial'),- ('userprofile', '__first__'),+ ('account', '__first__'),]operations = [@@ -40,8 +40,8 @@ class Migration(migrations.Migration):('shipping_method', models.CharField(max_length=255, verbose_name='Delivery method', blank=True)),('anonymous_user_email', models.EmailField(default='', max_length=254, editable=False, blank=True)),('token', models.CharField(unique=True, max_length=36, verbose_name='token')),- ('billing_address', models.ForeignKey(related_name='+', editable=False, to='userprofile.Address', on_delete=django.db.models.deletion.CASCADE)),- ('shipping_address', models.ForeignKey(related_name='+', editable=False, to='userprofile.Address', null=True, on_delete=django.db.models.deletion.CASCADE)),+ ('billing_address', models.ForeignKey(related_name='+', editable=False, to='account.Address', on_delete=django.db.models.deletion.CASCADE)),+ ('shipping_address', models.ForeignKey(related_name='+', editable=False, to='account.Address', null=True, on_delete=django.db.models.deletion.CASCADE)),('user', models.ForeignKey(related_name='orders', verbose_name='user', blank=True, to=settings.AUTH_USER_MODEL, null=True, on_delete=django.db.models.deletion.CASCADE)),],options={diff --git a/saleor/order/migrations/0015_auto_20170206_0407.py b/saleor/order/migrations/0015_auto_20170206_0407.pyindex 2e87e2925e..5452c3773e 100644--- a/saleor/order/migrations/0015_auto_20170206_0407.py+++ b/saleor/order/migrations/0015_auto_20170206_0407.py@@ -57,7 +57,7 @@ class Migration(migrations.Migration):migrations.AlterField(model_name='order',name='billing_address',- field=models.ForeignKey(editable=False, on_delete=django.db.models.deletion.CASCADE, related_name='+', to='userprofile.Address', verbose_name='billing address'),+ field=models.ForeignKey(editable=False, on_delete=django.db.models.deletion.CASCADE, related_name='+', to='account.Address', verbose_name='billing address'),),migrations.AlterField(model_name='order',@@ -72,7 +72,7 @@ class Migration(migrations.Migration):migrations.AlterField(model_name='order',name='shipping_address',- field=models.ForeignKey(editable=False, null=True, on_delete=django.db.models.deletion.CASCADE, related_name='+', to='userprofile.Address', verbose_name='shipping address'),+ field=models.ForeignKey(editable=False, null=True, on_delete=django.db.models.deletion.CASCADE, related_name='+', to='account.Address', verbose_name='shipping address'),),migrations.AlterField(model_name='order',diff --git a/saleor/order/migrations/0019_auto_20171109_1423.py b/saleor/order/migrations/0019_auto_20171109_1423.pyindex 76138ab1d2..db24a90116 100644--- a/saleor/order/migrations/0019_auto_20171109_1423.py+++ b/saleor/order/migrations/0019_auto_20171109_1423.py@@ -17,12 +17,12 @@ class Migration(migrations.Migration):migrations.AlterField(model_name='order',name='billing_address',- field=models.ForeignKey(editable=False, on_delete=django.db.models.deletion.PROTECT, related_name='+', to='userprofile.Address', verbose_name='billing address'),+ field=models.ForeignKey(editable=False, on_delete=django.db.models.deletion.PROTECT, related_name='+', to='account.Address', verbose_name='billing address'),),migrations.AlterField(model_name='order',name='shipping_address',- field=models.ForeignKey(editable=False, null=True, on_delete=django.db.models.deletion.PROTECT, related_name='+', to='userprofile.Address', verbose_name='shipping address'),+ field=models.ForeignKey(editable=False, null=True, on_delete=django.db.models.deletion.PROTECT, related_name='+', to='account.Address', verbose_name='shipping address'),),migrations.AlterField(model_name='order',diff --git a/saleor/order/migrations/0027_auto_20180108_0814.py b/saleor/order/migrations/0027_auto_20180108_0814.pyindex c9039dbc1a..364fa6fba5 100644--- a/saleor/order/migrations/0027_auto_20180108_0814.py+++ b/saleor/order/migrations/0027_auto_20180108_0814.py@@ -40,7 +40,7 @@ class Migration(migrations.Migration):migrations.AlterField(model_name='order',name='billing_address',- field=models.ForeignKey(editable=False, on_delete=django.db.models.deletion.PROTECT, related_name='+', to='userprofile.Address'),+ field=models.ForeignKey(editable=False, on_delete=django.db.models.deletion.PROTECT, related_name='+', to='account.Address'),),migrations.AlterField(model_name='order',@@ -65,7 +65,7 @@ class Migration(migrations.Migration):migrations.AlterField(model_name='order',name='shipping_address',- field=models.ForeignKey(editable=False, null=True, on_delete=django.db.models.deletion.PROTECT, related_name='+', to='userprofile.Address'),+ field=models.ForeignKey(editable=False, null=True, on_delete=django.db.models.deletion.PROTECT, related_name='+', to='account.Address'),),migrations.AlterField(model_name='order',diff --git a/saleor/order/models.py b/saleor/order/models.pyindex cdcda62861..5b2df499c9 100644--- a/saleor/order/models.py+++ b/saleor/order/models.py@@ -19,7 +19,7 @@ from . import GroupStatus, OrderStatus, emailsfrom ..core.utils import build_absolute_urifrom ..discount.models import Voucherfrom ..product.models import Product-from ..userprofile.models import Address+from ..account.models import Addressfrom .transitions import (cancel_delivery_group, process_delivery_group, ship_delivery_group)diff --git a/saleor/order/utils.py b/saleor/order/utils.pyindex 20759f5ae7..e664acdc6c 100644--- a/saleor/order/utils.py+++ b/saleor/order/utils.py@@ -9,7 +9,7 @@ from satchless.item import InsufficientStockfrom . import GroupStatusfrom ..product.utils import allocate_stock-from ..userprofile.utils import store_user_address+from ..account.utils import store_user_addressdef check_order_status(func):diff --git a/saleor/order/views.py b/saleor/order/views.pyindex 32af07de16..e9cd6d35d3 100644--- a/saleor/order/views.py+++ b/saleor/order/views.py@@ -13,7 +13,7 @@ from payments import PaymentStatus, RedirectNeededfrom . import OrderStatusfrom ..core.utils import get_client_ipfrom ..registration.forms import LoginForm-from ..userprofile.models import User+from ..account.models import Userfrom .forms import (OrderNoteForm, PasswordForm, PaymentDeleteForm, PaymentMethodsForm)from .models import Order, OrderNote, Paymentdiff --git a/saleor/registration/forms.py b/saleor/registration/forms.pyindex 2d6cb1ac04..0a6f2df611 100644--- a/saleor/registration/forms.py+++ b/saleor/registration/forms.py@@ -2,7 +2,7 @@ from django import formsfrom django.contrib.auth import forms as django_formsfrom django.utils.translation import pgettext, pgettext_lazy-from ..userprofile.models import User+from ..account.models import Userfrom . import emailsdiff --git a/saleor/search/backends/postgresql_dashboard.py b/saleor/search/backends/postgresql_dashboard.pyindex 03d93048fd..f5c7513789 100644--- a/saleor/search/backends/postgresql_dashboard.py+++ b/saleor/search/backends/postgresql_dashboard.py@@ -3,7 +3,7 @@ from django.contrib.postgres.search import (from ...order.models import Orderfrom ...product.models import Product-from ...userprofile.models import User+from ...account.models import Userdef search_products(phrase):diff --git a/saleor/search/documents.py b/saleor/search/documents.pyindex bf909da5f0..11b64e386b 100644--- a/saleor/search/documents.py+++ b/saleor/search/documents.py@@ -3,7 +3,7 @@ from elasticsearch_dsl import analyzer, token_filterfrom ..order.models import Orderfrom ..product.models import Product-from ..userprofile.models import User+from ..account.models import Userstorefront = Index('storefront')storefront.settings(number_of_shards=1, number_of_replicas=0)diff --git a/saleor/settings.py b/saleor/settings.pyindex 3565b054c0..5d081c2c1b 100644--- a/saleor/settings.py+++ b/saleor/settings.py@@ -154,7 +154,7 @@ INSTALLED_APPS = ['django.forms',# Local apps- 'saleor.userprofile',+ 'saleor.account','saleor.discount','saleor.product','saleor.cart',@@ -225,7 +225,7 @@ LOGGING = {'level': 'DEBUG','propagate': True}}}-AUTH_USER_MODEL = 'userprofile.User'+AUTH_USER_MODEL = 'account.User'LOGIN_URL = '/account/login/'@@ -396,6 +396,6 @@ CELERY_RESULT_BACKEND = 'django-db'# Impersonate module settingsIMPERSONATE = {'URI_EXCLUSIONS': [r'^dashboard/'],- 'CUSTOM_USER_QUERYSET': 'saleor.userprofile.impersonate.get_impersonatable_users', # noqa+ 'CUSTOM_USER_QUERYSET': 'saleor.account.impersonate.get_impersonatable_users', # noqa'USE_HTTP_REFERER': True,- 'CUSTOM_ALLOW': 'saleor.userprofile.impersonate.can_impersonate'}+ 'CUSTOM_ALLOW': 'saleor.account.impersonate.can_impersonate'}diff --git a/saleor/urls.py b/saleor/urls.pyindex 9d851fb430..634a78c409 100644--- a/saleor/urls.py+++ b/saleor/urls.py@@ -16,7 +16,7 @@ from .order.urls import urlpatterns as order_urlsfrom .product.urls import urlpatterns as product_urlsfrom .registration.urls import urlpatterns as registration_urlsfrom .search.urls import urlpatterns as search_urls-from .userprofile.urls import urlpatterns as userprofile_urls+from .account.urls import urlpatterns as userprofile_urlshandler404 = 'saleor.core.views.handle_404'diff --git a/templates/userprofile/address_delete.html b/templates/account/address_delete.htmlsimilarity index 100%rename from templates/userprofile/address_delete.htmlrename to templates/account/address_delete.htmldiff --git a/templates/userprofile/address_edit.html b/templates/account/address_edit.htmlsimilarity index 100%rename from templates/userprofile/address_edit.htmlrename to templates/account/address_edit.htmldiff --git a/templates/userprofile/details.html b/templates/account/details.htmlsimilarity index 100%rename from templates/userprofile/details.htmlrename to templates/account/details.htmldiff --git a/templates/userprofile/snippets/address_form.html b/templates/account/snippets/address_form.htmlsimilarity index 100%rename from templates/userprofile/snippets/address_form.htmlrename to templates/account/snippets/address_form.htmldiff --git a/templates/userprofile/snippets/datalist.html b/templates/account/snippets/datalist.htmlsimilarity index 100%rename from templates/userprofile/snippets/datalist.htmlrename to templates/account/snippets/datalist.htmldiff --git a/templates/userprofile/snippets/phone_prefix_widget.html b/templates/account/snippets/phone_prefix_widget.htmlsimilarity index 100%rename from templates/userprofile/snippets/phone_prefix_widget.htmlrename to templates/account/snippets/phone_prefix_widget.htmldiff --git a/templates/checkout/summary_without_shipping.html b/templates/checkout/summary_without_shipping.htmlindex 4336f34b6d..1233ae9ce7 100644--- a/templates/checkout/summary_without_shipping.html+++ b/templates/checkout/summary_without_shipping.html@@ -10,7 +10,7 @@{% include "checkout/snippets/addresses_form.html" with addresses_form=addresses_form addresses=additional_addresses address_form=address_form only %}{% else %}{% bootstrap_form user_form %}- {% include "userprofile/snippets/address_form.html" with address_form=address_form only %}+ {% include "account/snippets/address_form.html" with address_form=address_form only %}{% endif %}<h2>{% trans "Add a note to your order" context "Checkout summary without shipping note title" %}</h2>{% bootstrap_form note_form show_label=False %}@@ -20,4 +20,4 @@</button></p></form>-{% endblock forms %}\ No newline at end of file+{% endblock forms %}diff --git a/tests/conftest.py b/tests/conftest.pyindex ae043ad929..11a0843d0a 100644--- a/tests/conftest.py+++ b/tests/conftest.py@@ -23,7 +23,7 @@ from saleor.product.models import (ProductImage, ProductType, ProductVariant, Stock, StockLocation)from saleor.shipping.models import ShippingMethodfrom saleor.site.models import AuthorizationKey, SiteSettings-from saleor.userprofile.models import Address, User+from saleor.account.models import Address, User@pytest.fixture(autouse=True)diff --git a/tests/dashboard/test_permissions.py b/tests/dashboard/test_permissions.pyindex 3634c0ce0d..6e4bde6fa2 100644--- a/tests/dashboard/test_permissions.py+++ b/tests/dashboard/test_permissions.py@@ -1,6 +1,6 @@from django.urls import reverse-from saleor.userprofile.models import User+from saleor.account.models import Userdef test_admin_can_view_staff_list(admin_client):@@ -671,13 +671,13 @@ def test_staff_group_member_can_view_billing_address_edit(def test_staff_group_member_can_view_customers_list(staff_client, staff_user, staff_group, permission_view_user):- assert not staff_user.has_perm("userprofile.view_user")+ assert not staff_user.has_perm("account.view_user")response = staff_client.get(reverse('dashboard:customers'))assert response.status_code == 302staff_group.permissions.add(permission_view_user)staff_user.groups.add(staff_group)staff_user = User.objects.get(pk=staff_user.pk)- assert staff_user.has_perm("userprofile.view_user")+ assert staff_user.has_perm("account.view_user")response = staff_client.get(reverse('dashboard:customers'))assert response.status_code == 200@@ -685,14 +685,14 @@ def test_staff_group_member_can_view_customers_list(def test_staff_group_member_can_view_customer_details(staff_client, staff_user, staff_group, permission_view_user,customer_user, order_with_lines_and_stock):- assert not staff_user.has_perm("userprofile.view_user")+ assert not staff_user.has_perm("account.view_user")response = staff_client.get(reverse('dashboard:customer-details',args=[customer_user.pk]))assert response.status_code == 302staff_group.permissions.add(permission_view_user)staff_user.groups.add(staff_group)staff_user = User.objects.get(pk=staff_user.pk)- assert staff_user.has_perm("userprofile.view_user")+ assert staff_user.has_perm("account.view_user")response = staff_client.get(reverse('dashboard:customer-details',args=[customer_user.pk]))assert response.status_code == 200@@ -703,20 +703,20 @@ def test_staff_group_member_can_view_customer_details(def test_staff_group_member_can_view_staff_members_list(staff_client, staff_user, staff_group, permission_view_staff):- assert not staff_user.has_perm("userprofile.view_staff")+ assert not staff_user.has_perm("account.view_staff")response = staff_client.get(reverse('dashboard:staff-list'))assert response.status_code == 302staff_group.permissions.add(permission_view_staff)staff_user.groups.add(staff_group)staff_user = User.objects.get(pk=staff_user.pk)- assert staff_user.has_perm("userprofile.view_staff")+ assert staff_user.has_perm("account.view_staff")response = staff_client.get(reverse('dashboard:staff-list'))assert response.status_code == 200def test_staff_group_member_can_view_detail_create_and_delete_staff_members(staff_client, staff_user, staff_group, permission_edit_staff):- assert not staff_user.has_perm("userprofile.edit_staff")+ assert not staff_user.has_perm("account.edit_staff")response = staff_client.get(reverse('dashboard:staff-create'))assert response.status_code == 302response = staff_client.get(reverse('dashboard:staff-delete',@@ -728,7 +728,7 @@ def test_staff_group_member_can_view_detail_create_and_delete_staff_members(staff_group.permissions.add(permission_edit_staff)staff_user.groups.add(staff_group)staff_user = User.objects.get(pk=staff_user.pk)- assert staff_user.has_perm("userprofile.edit_staff")+ assert staff_user.has_perm("account.edit_staff")response = staff_client.get(reverse('dashboard:staff-create'))assert response.status_code == 200response = staff_client.get(reverse('dashboard:staff-delete',@@ -741,20 +741,20 @@ def test_staff_group_member_can_view_detail_create_and_delete_staff_members(def test_staff_group_member_can_view_group_list_and_details(staff_client, staff_user, staff_group, permission_view_group):- assert not staff_user.has_perm("userprofile.view_group")+ assert not staff_user.has_perm("account.view_group")response = staff_client.get(reverse('dashboard:group-list'))assert response.status_code == 302staff_group.permissions.add(permission_view_group)staff_user.groups.add(staff_group)staff_user = User.objects.get(pk=staff_user.pk)- assert staff_user.has_perm("userprofile.view_group")+ assert staff_user.has_perm("account.view_group")response = staff_client.get(reverse('dashboard:group-list'))assert response.status_code == 200def test_staff_with_permission_can_create_and_delete_group(staff_client, staff_user, staff_group, permission_edit_group):- assert not staff_user.has_perm("userprofile.edit_group")+ assert not staff_user.has_perm("account.edit_group")response = staff_client.get(reverse('dashboard:group-delete',args=[staff_group.pk]))assert response.status_code == 302@@ -766,7 +766,7 @@ def test_staff_with_permission_can_create_and_delete_group(staff_group.permissions.add(permission_edit_group)staff_user.groups.add(staff_group)staff_user = User.objects.get(pk=staff_user.pk)- assert staff_user.has_perm("userprofile.edit_group")+ assert staff_user.has_perm("account.edit_group")response = staff_client.get(reverse('dashboard:group-details',args=[staff_group.pk]))assert response.status_code == 200@@ -919,8 +919,8 @@ def test_staff_with_permissions_can_edit_customer(staff_group.permissions.add(permission_view_user)staff_user.groups.add(staff_group)staff_user = User.objects.get(pk=staff_user.pk)- assert staff_user.has_perm("userprofile.edit_user")- assert staff_user.has_perm("userprofile.view_user")+ assert staff_user.has_perm("account.edit_user")+ assert staff_user.has_perm("account.view_user")response = staff_client.get(reverse('dashboard:customer-update',args=[customer_user.pk]))assert response.status_code == 200@@ -939,8 +939,8 @@ def test_staff_with_permissions_can_add_customer(staff_group.permissions.add(permission_view_user)staff_user.groups.add(staff_group)staff_user = User.objects.get(pk=staff_user.pk)- assert staff_user.has_perm("userprofile.edit_user")- assert staff_user.has_perm("userprofile.view_user")+ assert staff_user.has_perm("account.edit_user")+ assert staff_user.has_perm("account.view_user")response = staff_client.get(reverse('dashboard:customer-create'))assert response.status_code == 200url = reverse('dashboard:customer-create')diff --git a/tests/dashboard/test_staff.py b/tests/dashboard/test_staff.pyindex afba112ef9..0afeea9d55 100644--- a/tests/dashboard/test_staff.py+++ b/tests/dashboard/test_staff.py@@ -8,7 +8,7 @@ from templated_email import send_templated_mailfrom saleor.dashboard.staff.forms import StaffFormfrom saleor.settings import DEFAULT_FROM_EMAIL-from saleor.userprofile.models import User+from saleor.account.models import Userdef test_staff_form_not_valid(db):diff --git a/tests/test_checkout.py b/tests/test_checkout.pyindex f0add06e4e..eb07599b3d 100644--- a/tests/test_checkout.py+++ b/tests/test_checkout.py@@ -10,7 +10,7 @@ from saleor.checkout import viewsfrom saleor.checkout.core import STORAGE_SESSION_KEY, Checkoutfrom saleor.checkout.forms import NoteFormfrom saleor.shipping.models import ShippingMethodCountry-from saleor.userprofile.models import Address+from saleor.account.models import Addressdef test_checkout_version():diff --git a/tests/test_checkout_integration.py b/tests/test_checkout_integration.pyindex e842793034..d6678e5fe9 100644--- a/tests/test_checkout_integration.py+++ b/tests/test_checkout_integration.py@@ -1,7 +1,7 @@from django.urls import reversefrom payments import FraudStatus, PaymentStatus-from saleor.userprofile.models import User+from saleor.account.models import Userfrom .utils import get_redirect_locationdiff --git a/tests/test_core.py b/tests/test_core.pyindex b804e76b9b..f086cce93c 100644--- a/tests/test_core.py+++ b/tests/test_core.py@@ -10,7 +10,7 @@ from saleor.discount.models import Sale, Voucherfrom saleor.order.models import Orderfrom saleor.product.models import Productfrom saleor.shipping.models import ShippingMethod-from saleor.userprofile.models import Address, User+from saleor.account.models import Address, Usertype_schema = {'Vegetable': {diff --git a/tests/test_elasticsearch.py b/tests/test_elasticsearch.pyindex 7f97cc0e34..498fd9440c 100644--- a/tests/test_elasticsearch.py+++ b/tests/test_elasticsearch.py@@ -6,7 +6,7 @@ from elasticsearch_dsl.connections import connectionsfrom saleor.order.models import Orderfrom saleor.product.models import Product-from saleor.userprofile.models import User+from saleor.account.models import UserMATCH_SEARCH_REQUEST = ['method', 'host', 'port', 'path']STOREFRONT_PRODUCTS = {15, 56} # same as in recorded data!diff --git a/tests/test_impersonation.py b/tests/test_impersonation.pyindex 0391ba3671..bb73e35089 100644--- a/tests/test_impersonation.py+++ b/tests/test_impersonation.py@@ -2,7 +2,7 @@ import pytestfrom django.urls import reversefrom django.urls.exceptions import NoReverseMatch-from saleor.userprofile.models import User+from saleor.account.models import Userdef test_staff_with_permission_can_impersonate(diff --git a/tests/test_postgresql_search.py b/tests/test_postgresql_search.pyindex be4a8ea53e..00fc65caa9 100644--- a/tests/test_postgresql_search.py+++ b/tests/test_postgresql_search.py@@ -5,7 +5,7 @@ from django.urls import reversefrom saleor.order.models import Orderfrom saleor.product.models import Product-from saleor.userprofile.models import Address, User+from saleor.account.models import Address, User@pytest.fixture(scope='function', autouse=True)@@ -227,7 +227,7 @@ def test_find_user_by_name(admin_client, users_with_addresses, phrase,USER_PHRASE_WITH_RESULT = '[email protected]'-USER_RESULTS_PERMISSION = 'userprofile.view_user'+USER_RESULTS_PERMISSION = 'account.view_user'@pytest.mark.integrationdiff --git a/tests/test_userprofile.py b/tests/test_userprofile.pyindex cba400d3b2..1d11f12158 100644--- a/tests/test_userprofile.py+++ b/tests/test_userprofile.py@@ -9,9 +9,9 @@ from django.template import Context, Templatefrom django.urls import reversefrom django_countries.fields import Country-from saleor.userprofile import forms, i18n-from saleor.userprofile.templatetags.i18n_address_tags import format_address-from saleor.userprofile.validators import validate_possible_number+from saleor.account import forms, i18n+from saleor.account.templatetags.i18n_address_tags import format_address+from saleor.account.validators import validate_possible_number@pytest.mark.parametrize('country', ['CN', 'PL', 'US'])