Saleor Core: the high performance, composable, headless commerce API.
Python cartcheckoutcommercecomposablee-commerceecommercegraphqlheadlessheadless-commercemultichannelomsorder-managementpaymentspimpythonshopshopping-cartstore
Rename shop to saleor, Python 3 compatibility
Patryk Zawadzkib7d40bc4190f
diff --git a/.travis.yml b/.travis.ymlindex 40d66a55f8..c12a1fece9 100644--- a/.travis.yml+++ b/.travis.yml@@ -7,5 +7,5 @@ python:install:- python setup.py installscript:- - export DJANGO_SETTINGS_MODULE=shop.test_settings+ - export DJANGO_SETTINGS_MODULE=saleor.test_settings- python setup.py testdiff --git a/manage.py b/manage.pyindex 32f2695e25..de46e4e0a3 100755--- a/manage.py+++ b/manage.py@@ -3,7 +3,7 @@ import osimport sysif __name__ == "__main__":- os.environ.setdefault("DJANGO_SETTINGS_MODULE", "shop.settings")+ os.environ.setdefault("DJANGO_SETTINGS_MODULE", "saleor.settings")from django.core.management import execute_from_command_linediff --git a/shop/__init__.py b/saleor/__init__.pysimilarity index 70%rename from shop/__init__.pyrename to saleor/__init__.pyindex 33f8e739b5..4fe58bb95c 100644--- a/shop/__init__.py+++ b/saleor/__init__.py@@ -6,5 +6,5 @@ def manage():import sysfrom django.core.management import execute_from_command_line- os.environ.setdefault("DJANGO_SETTINGS_MODULE", "shop.settings")+ os.environ.setdefault("DJANGO_SETTINGS_MODULE", "saleor.settings")execute_from_command_line(sys.argv)diff --git a/shop/cart/__init__.py b/saleor/cart/__init__.pysimilarity index 100%rename from shop/cart/__init__.pyrename to saleor/cart/__init__.pydiff --git a/shop/cart/forms.py b/saleor/cart/forms.pysimilarity index 97%rename from shop/cart/forms.pyrename to saleor/cart/forms.pyindex 0844fbf47c..384ecc7495 100644--- a/shop/cart/forms.py+++ b/saleor/cart/forms.py@@ -1,7 +1,7 @@from decimal import Decimalfrom django import forms-from django.forms.formsets import BaseFormSet+from django.forms.formsets import BaseFormSet, DEFAULT_MAX_NUMfrom django.utils.translation import pgettext, ugettextfrom satchless.item import InsufficientStock@@ -83,7 +83,7 @@ class ReplaceCartLineFormSet(BaseFormSet):can_order = Falseextra = 0form = ReplaceCartLineForm- max_num = None+ max_num = DEFAULT_MAX_NUMdef __init__(self, *args, **kwargs):self.cart = kwargs.pop('cart')diff --git a/shop/cart/middleware.py b/saleor/cart/middleware.pysimilarity index 100%rename from shop/cart/middleware.pyrename to saleor/cart/middleware.pydiff --git a/shop/cart/models.py b/saleor/cart/models.pysimilarity index 100%rename from shop/cart/models.pyrename to saleor/cart/models.pydiff --git a/shop/cart/templates/cart/index.html b/saleor/cart/templates/cart/index.htmlsimilarity index 100%rename from shop/cart/templates/cart/index.htmlrename to saleor/cart/templates/cart/index.htmldiff --git a/shop/cart/tests.py b/saleor/cart/tests.pysimilarity index 100%rename from shop/cart/tests.pyrename to saleor/cart/tests.pydiff --git a/shop/cart/urls.py b/saleor/cart/urls.pysimilarity index 100%rename from shop/cart/urls.pyrename to saleor/cart/urls.pydiff --git a/shop/cart/views.py b/saleor/cart/views.pysimilarity index 100%rename from shop/cart/views.pyrename to saleor/cart/views.pydiff --git a/shop/checkout/__init__.py b/saleor/checkout/__init__.pysimilarity index 100%rename from shop/checkout/__init__.pyrename to saleor/checkout/__init__.pydiff --git a/shop/checkout/forms.py b/saleor/checkout/forms.pysimilarity index 100%rename from shop/checkout/forms.pyrename to saleor/checkout/forms.pydiff --git a/shop/checkout/models.py b/saleor/checkout/models.pysimilarity index 100%rename from shop/checkout/models.pyrename to saleor/checkout/models.pydiff --git a/shop/checkout/steps.py b/saleor/checkout/steps.pysimilarity index 100%rename from shop/checkout/steps.pyrename to saleor/checkout/steps.pydiff --git a/shop/checkout/templates/checkout/address.html b/saleor/checkout/templates/checkout/address.htmlsimilarity index 100%rename from shop/checkout/templates/checkout/address.htmlrename to saleor/checkout/templates/checkout/address.htmldiff --git a/shop/checkout/templates/checkout/billing.html b/saleor/checkout/templates/checkout/billing.htmlsimilarity index 100%rename from shop/checkout/templates/checkout/billing.htmlrename to saleor/checkout/templates/checkout/billing.htmldiff --git a/shop/checkout/templates/checkout/details.html b/saleor/checkout/templates/checkout/details.htmlsimilarity index 100%rename from shop/checkout/templates/checkout/details.htmlrename to saleor/checkout/templates/checkout/details.htmldiff --git a/shop/checkout/templates/checkout/digitaldelivery.html b/saleor/checkout/templates/checkout/digitaldelivery.htmlsimilarity index 100%rename from shop/checkout/templates/checkout/digitaldelivery.htmlrename to saleor/checkout/templates/checkout/digitaldelivery.htmldiff --git a/shop/checkout/templates/checkout/shipping.html b/saleor/checkout/templates/checkout/shipping.htmlsimilarity index 100%rename from shop/checkout/templates/checkout/shipping.htmlrename to saleor/checkout/templates/checkout/shipping.htmldiff --git a/shop/checkout/templates/checkout/summary.html b/saleor/checkout/templates/checkout/summary.htmlsimilarity index 100%rename from shop/checkout/templates/checkout/summary.htmlrename to saleor/checkout/templates/checkout/summary.htmldiff --git a/shop/checkout/tests.py b/saleor/checkout/tests.pysimilarity index 100%rename from shop/checkout/tests.pyrename to saleor/checkout/tests.pydiff --git a/shop/checkout/urls.py b/saleor/checkout/urls.pysimilarity index 100%rename from shop/checkout/urls.pyrename to saleor/checkout/urls.pydiff --git a/shop/checkout/views.py b/saleor/checkout/views.pysimilarity index 100%rename from shop/checkout/views.pyrename to saleor/checkout/views.pydiff --git a/shop/communication/__init__.py b/saleor/communication/__init__.pysimilarity index 100%rename from shop/communication/__init__.pyrename to saleor/communication/__init__.pydiff --git a/shop/communication/mail.py b/saleor/communication/mail.pysimilarity index 100%rename from shop/communication/mail.pyrename to saleor/communication/mail.pydiff --git a/shop/communication/tests.py b/saleor/communication/tests.pysimilarity index 89%rename from shop/communication/tests.pyrename to saleor/communication/tests.pyindex c1f6b32c24..2914604114 100644--- a/shop/communication/tests.py+++ b/saleor/communication/tests.py@@ -9,11 +9,11 @@ from .mail import SUBJECT, TEXT, HTML, send_email, render_blocksclass SendEmailTestCase(TestCase):def setUp(self):- patcher = patch('shop.communication.mail.settings')+ patcher = patch('saleor.communication.mail.settings')self.settings_mock = patcher.start()- patcher = patch('shop.communication.mail.render_blocks')+ patcher = patch('saleor.communication.mail.render_blocks')self.render_mock = patcher.start()- patcher = patch('shop.communication.mail.EmailMultiAlternatives')+ patcher = patch('saleor.communication.mail.EmailMultiAlternatives')self.email_mock = patcher.start()self.settings_mock.DEFAULT_FROM_EMAIL = sentinel.from_email@@ -54,8 +54,8 @@ class SendEmailTestCase(TestCase):class RenderBlocksTestCase(TestCase):- @patch('shop.communication.mail.get_template')- @patch('shop.communication.mail.Context')+ @patch('saleor.communication.mail.get_template')+ @patch('saleor.communication.mail.Context')def test_block_rendering(self, context_mock, get_template_mock):"""Template blocks are rendered with proper context"""html_block = Mock(spec=BlockNode)diff --git a/shop/core/__init__.py b/saleor/core/__init__.pysimilarity index 100%rename from shop/core/__init__.pyrename to saleor/core/__init__.pydiff --git a/shop/core/context_processors.py b/saleor/core/context_processors.pysimilarity index 100%rename from shop/core/context_processors.pyrename to saleor/core/context_processors.pydiff --git a/shop/core/countries.py b/saleor/core/countries.pysimilarity index 100%rename from shop/core/countries.pyrename to saleor/core/countries.pydiff --git a/shop/core/middleware.py b/saleor/core/middleware.pysimilarity index 100%rename from shop/core/middleware.pyrename to saleor/core/middleware.pydiff --git a/shop/core/models.py b/saleor/core/models.pysimilarity index 100%rename from shop/core/models.pyrename to saleor/core/models.pydiff --git a/shop/core/templates/bootstrap/_field_horizontal.html b/saleor/core/templates/bootstrap/_field_horizontal.htmlsimilarity index 100%rename from shop/core/templates/bootstrap/_field_horizontal.htmlrename to saleor/core/templates/bootstrap/_field_horizontal.htmldiff --git a/shop/core/templates/bootstrap/_field_vertical.html b/saleor/core/templates/bootstrap/_field_vertical.htmlsimilarity index 100%rename from shop/core/templates/bootstrap/_field_vertical.htmlrename to saleor/core/templates/bootstrap/_field_vertical.htmldiff --git a/shop/core/templates/bootstrap/_non_field_errors.html b/saleor/core/templates/bootstrap/_non_field_errors.htmlsimilarity index 100%rename from shop/core/templates/bootstrap/_non_field_errors.htmlrename to saleor/core/templates/bootstrap/_non_field_errors.htmldiff --git a/shop/core/templatetags/__init__.py b/saleor/core/templatetags/__init__.pysimilarity index 100%rename from shop/core/templatetags/__init__.pyrename to saleor/core/templatetags/__init__.pydiff --git a/shop/core/templatetags/bootstrap.py b/saleor/core/templatetags/bootstrap.pysimilarity index 100%rename from shop/core/templatetags/bootstrap.pyrename to saleor/core/templatetags/bootstrap.pydiff --git a/shop/core/templatetags/shop.py b/saleor/core/templatetags/shop.pysimilarity index 50%rename from shop/core/templatetags/shop.pyrename to saleor/core/templatetags/shop.pyindex d9d5a7402f..f531870389 100644--- a/shop/core/templatetags/shop.py+++ b/saleor/core/templatetags/shop.py@@ -1,4 +1,7 @@-from itertools import izip_longest+try:+ from itertools import zip_longest+except ImportError:+ from itertools import izip_longest as zip_longestfrom django.template import Library@@ -9,4 +12,4 @@ register = Library()def slice(items, group_size=1):args = [iter(items)] * group_sizereturn (filter(None, group)- for group in izip_longest(*args, fillvalue=None))+ for group in zip_longest(*args, fillvalue=None))diff --git a/shop/core/tests.py b/saleor/core/tests.pysimilarity index 100%rename from shop/core/tests.pyrename to saleor/core/tests.pydiff --git a/shop/core/urls.py b/saleor/core/urls.pysimilarity index 100%rename from shop/core/urls.pyrename to saleor/core/urls.pydiff --git a/shop/core/utils/__init__.py b/saleor/core/utils/__init__.pysimilarity index 100%rename from shop/core/utils/__init__.pyrename to saleor/core/utils/__init__.pydiff --git a/shop/core/utils/models.py b/saleor/core/utils/models.pysimilarity index 100%rename from shop/core/utils/models.pyrename to saleor/core/utils/models.pydiff --git a/shop/core/views.py b/saleor/core/views.pysimilarity index 100%rename from shop/core/views.pyrename to saleor/core/views.pydiff --git a/shop/delivery/__init__.py b/saleor/delivery/__init__.pysimilarity index 100%rename from shop/delivery/__init__.pyrename to saleor/delivery/__init__.pydiff --git a/shop/order/__init__.py b/saleor/order/__init__.pysimilarity index 100%rename from shop/order/__init__.pyrename to saleor/order/__init__.pydiff --git a/shop/order/admin.py b/saleor/order/admin.pysimilarity index 100%rename from shop/order/admin.pyrename to saleor/order/admin.pydiff --git a/shop/order/models.py b/saleor/order/models.pysimilarity index 98%rename from shop/order/models.pyrename to saleor/order/models.pyindex e1e63f54d2..441856d66b 100644--- a/shop/order/models.py+++ b/saleor/order/models.py@@ -5,6 +5,7 @@ from decimal import Decimalfrom django.conf import settingsfrom django.core.urlresolvers import reversefrom django.db import models+from django.utils.encoding import smart_textfrom django.utils.translation import pgettext_lazyfrom django_prices.models import PriceFieldfrom prices import Price@@ -53,7 +54,7 @@ class Order(models.Model, ItemSet):def save(self, *args, **kwargs):if not self.token:- for _i in xrange(100):+ for _i in range(100):token = str(uuid4())if not type(self).objects.filter(token=token).exists():self.token = token@@ -141,7 +142,7 @@ class DeliveryGroup(Subtyped, ItemSet):def add_items_from_partition(self, partition):for item_line in partition:- product_name = unicode(item_line.product)+ product_name = smart_text(item_line.product)price = item_line.get_price_per_item()self.items.create(product=item_line.product,diff --git a/shop/order/static/js/order_details.js b/saleor/order/static/js/order_details.jssimilarity index 100%rename from shop/order/static/js/order_details.jsrename to saleor/order/static/js/order_details.jsdiff --git a/shop/order/templates/order/details.html b/saleor/order/templates/order/details.htmlsimilarity index 100%rename from shop/order/templates/order/details.htmlrename to saleor/order/templates/order/details.htmldiff --git a/shop/order/templates/order/emails/confirm_email.txt b/saleor/order/templates/order/emails/confirm_email.txtsimilarity index 100%rename from shop/order/templates/order/emails/confirm_email.txtrename to saleor/order/templates/order/emails/confirm_email.txtdiff --git a/shop/order/templates/order/success.html b/saleor/order/templates/order/success.htmlsimilarity index 100%rename from shop/order/templates/order/success.htmlrename to saleor/order/templates/order/success.htmldiff --git a/shop/order/tests.py b/saleor/order/tests.pysimilarity index 100%rename from shop/order/tests.pyrename to saleor/order/tests.pydiff --git a/shop/order/urls.py b/saleor/order/urls.pysimilarity index 100%rename from shop/order/urls.pyrename to saleor/order/urls.pydiff --git a/shop/order/views.py b/saleor/order/views.pysimilarity index 100%rename from shop/order/views.pyrename to saleor/order/views.pydiff --git a/shop/payment/__init__.py b/saleor/payment/__init__.pysimilarity index 100%rename from shop/payment/__init__.pyrename to saleor/payment/__init__.pydiff --git a/shop/payment/forms.py b/saleor/payment/forms.pysimilarity index 100%rename from shop/payment/forms.pyrename to saleor/payment/forms.pydiff --git a/shop/payment/models.py b/saleor/payment/models.pysimilarity index 100%rename from shop/payment/models.pyrename to saleor/payment/models.pydiff --git a/shop/payment/templates/payment/default.html b/saleor/payment/templates/payment/default.htmlsimilarity index 100%rename from shop/payment/templates/payment/default.htmlrename to saleor/payment/templates/payment/default.htmldiff --git a/shop/payment/templates/payment/details.html b/saleor/payment/templates/payment/details.htmlsimilarity index 100%rename from shop/payment/templates/payment/details.htmlrename to saleor/payment/templates/payment/details.htmldiff --git a/shop/payment/templates/payment/emails/confirm_email.txt b/saleor/payment/templates/payment/emails/confirm_email.txtsimilarity index 100%rename from shop/payment/templates/payment/emails/confirm_email.txtrename to saleor/payment/templates/payment/emails/confirm_email.txtdiff --git a/shop/payment/templates/payment/index.html b/saleor/payment/templates/payment/index.htmlsimilarity index 100%rename from shop/payment/templates/payment/index.htmlrename to saleor/payment/templates/payment/index.htmldiff --git a/shop/payment/templates/payment/paypal-card.html b/saleor/payment/templates/payment/paypal-card.htmlsimilarity index 100%rename from shop/payment/templates/payment/paypal-card.htmlrename to saleor/payment/templates/payment/paypal-card.htmldiff --git a/shop/payment/urls.py b/saleor/payment/urls.pysimilarity index 100%rename from shop/payment/urls.pyrename to saleor/payment/urls.pydiff --git a/shop/payment/views.py b/saleor/payment/views.pysimilarity index 100%rename from shop/payment/views.pyrename to saleor/payment/views.pydiff --git a/shop/product/__init__.py b/saleor/product/__init__.pysimilarity index 100%rename from shop/product/__init__.pyrename to saleor/product/__init__.pydiff --git a/shop/product/admin.py b/saleor/product/admin.pysimilarity index 100%rename from shop/product/admin.pyrename to saleor/product/admin.pydiff --git a/shop/product/forms.py b/saleor/product/forms.pysimilarity index 100%rename from shop/product/forms.pyrename to saleor/product/forms.pydiff --git a/shop/product/models.py b/saleor/product/models.pysimilarity index 100%rename from shop/product/models.pyrename to saleor/product/models.pydiff --git a/shop/product/templates/category/_list.html b/saleor/product/templates/category/_list.htmlsimilarity index 100%rename from shop/product/templates/category/_list.htmlrename to saleor/product/templates/category/_list.htmldiff --git a/shop/product/templates/category/index.html b/saleor/product/templates/category/index.htmlsimilarity index 100%rename from shop/product/templates/category/index.htmlrename to saleor/product/templates/category/index.htmldiff --git a/shop/product/templates/product/details.html b/saleor/product/templates/product/details.htmlsimilarity index 100%rename from shop/product/templates/product/details.htmlrename to saleor/product/templates/product/details.htmldiff --git a/shop/product/templatetags/__init__.py b/saleor/product/templatetags/__init__.pysimilarity index 100%rename from shop/product/templatetags/__init__.pyrename to saleor/product/templatetags/__init__.pydiff --git a/shop/product/templatetags/category.py b/saleor/product/templatetags/category.pysimilarity index 100%rename from shop/product/templatetags/category.pyrename to saleor/product/templatetags/category.pydiff --git a/shop/product/templatetags/discount.py b/saleor/product/templatetags/discount.pysimilarity index 99%rename from shop/product/templatetags/discount.pyrename to saleor/product/templatetags/discount.pyindex 77db963357..13f5ffd76c 100644--- a/shop/product/templatetags/discount.py+++ b/saleor/product/templatetags/discount.py@@ -7,6 +7,7 @@ register = template.Library()def undiscounted_price(item):return item.get_price(discounted=False)+@register.filterdef price_difference(price1, price2):return price1 - price2diff --git a/shop/product/urls.py b/saleor/product/urls.pysimilarity index 100%rename from shop/product/urls.pyrename to saleor/product/urls.pydiff --git a/shop/product/views.py b/saleor/product/views.pysimilarity index 100%rename from shop/product/views.pyrename to saleor/product/views.pydiff --git a/shop/registration/__init__.py b/saleor/registration/__init__.pysimilarity index 100%rename from shop/registration/__init__.pyrename to saleor/registration/__init__.pydiff --git a/shop/registration/backends.py b/saleor/registration/backends.pysimilarity index 100%rename from shop/registration/backends.pyrename to saleor/registration/backends.pydiff --git a/shop/registration/forms.py b/saleor/registration/forms.pysimilarity index 100%rename from shop/registration/forms.pyrename to saleor/registration/forms.pydiff --git a/shop/registration/models.py b/saleor/registration/models.pysimilarity index 100%rename from shop/registration/models.pyrename to saleor/registration/models.pydiff --git a/shop/registration/templates/registration/change_password.html b/saleor/registration/templates/registration/change_password.htmlsimilarity index 100%rename from shop/registration/templates/registration/change_password.htmlrename to saleor/registration/templates/registration/change_password.htmldiff --git a/shop/registration/templates/registration/emails/change_email.txt b/saleor/registration/templates/registration/emails/change_email.txtsimilarity index 100%rename from shop/registration/templates/registration/emails/change_email.txtrename to saleor/registration/templates/registration/emails/change_email.txtdiff --git a/shop/registration/templates/registration/emails/confirm_email.txt b/saleor/registration/templates/registration/emails/confirm_email.txtsimilarity index 100%rename from shop/registration/templates/registration/emails/confirm_email.txtrename to saleor/registration/templates/registration/emails/confirm_email.txtdiff --git a/shop/registration/templates/registration/invalid_token.html b/saleor/registration/templates/registration/invalid_token.htmlsimilarity index 100%rename from shop/registration/templates/registration/invalid_token.htmlrename to saleor/registration/templates/registration/invalid_token.htmldiff --git a/shop/registration/templates/registration/login.html b/saleor/registration/templates/registration/login.htmlsimilarity index 100%rename from shop/registration/templates/registration/login.htmlrename to saleor/registration/templates/registration/login.htmldiff --git a/shop/registration/templates/registration/logout.html b/saleor/registration/templates/registration/logout.htmlsimilarity index 100%rename from shop/registration/templates/registration/logout.htmlrename to saleor/registration/templates/registration/logout.htmldiff --git a/shop/registration/templates/registration/request_email_confirmation.html b/saleor/registration/templates/registration/request_email_confirmation.htmlsimilarity index 100%rename from shop/registration/templates/registration/request_email_confirmation.htmlrename to saleor/registration/templates/registration/request_email_confirmation.htmldiff --git a/shop/registration/templates/registration/set_password.html b/saleor/registration/templates/registration/set_password.htmlsimilarity index 100%rename from shop/registration/templates/registration/set_password.htmlrename to saleor/registration/templates/registration/set_password.htmldiff --git a/shop/registration/tests.py b/saleor/registration/tests.pysimilarity index 94%rename from shop/registration/tests.pyrename to saleor/registration/tests.pyindex bea13718c1..462939bbcd 100644--- a/shop/registration/tests.py+++ b/saleor/registration/tests.py@@ -95,8 +95,9 @@ class BaseCommunicationTestCase(TestCase):def setUp(self):self.parse_mock = patch(- 'shop.registration.utils.parse_response').start()- self.requests_mock = patch('shop.registration.utils.requests').start()+ 'saleor.registration.utils.parse_response').start()+ self.requests_mock = patch(+ 'saleor.registration.utils.requests').start()self.requests_mock.codes.ok = sentinel.okdef tearDown(self):@@ -194,9 +195,10 @@ class AuthorizerTestCase(TestCase):class CallbackTestCase(TestCase):def setUp(self):- patcher = patch('shop.registration.forms.get_client_class_for_service')+ patcher = patch(+ 'saleor.registration.forms.get_client_class_for_service')self.getter_mock = patcher.start()- patcher = patch('shop.registration.forms.authenticate')+ patcher = patch('saleor.registration.forms.authenticate')self.authenticate_mock = patcher.start()self.client_class = self.getter_mock()@@ -209,8 +211,8 @@ class CallbackTestCase(TestCase):data={'code': 'test_code'})self.assertTrue(self.form.is_valid(), self.form.errors)- @patch('shop.registration.forms.ExternalUserData')- @patch('shop.registration.forms.User')+ @patch('saleor.registration.forms.ExternalUserData')+ @patch('saleor.registration.forms.User')def test_new_user(self, user_mock, external_data_mock):"""OAuth2 callback creates a new user with proper external data"""user_mock.objects.get_or_create.return_value = sentinel.user, None@@ -242,7 +244,7 @@ class CallbackTestCase(TestCase):class EmailConfirmationTestCase(TestCase):- @patch('shop.registration.forms.authenticate')+ @patch('saleor.registration.forms.authenticate')def test_password_set(self, authenticate_mock):"""Email confirmation sets new password and logs the user"""user = Mock()@@ -258,7 +260,7 @@ class EmailConfirmationTestCase(TestCase):user.set_password.assert_called_once_with('pass')authenticate_mock.assert_called_once_with(user=user)- @patch('shop.registration.forms.authenticate')+ @patch('saleor.registration.forms.authenticate')def test_password_unset(self, authenticate_mock):"""Email confirmation unsets a password and logs the user"""user = Mock()@@ -277,8 +279,8 @@ class EmailConfirmationTestCase(TestCase):class EmailChangeTestCase(TestCase):- @patch('shop.registration.views.now')- @patch('shop.registration.views.EmailChangeRequest.objects.get')+ @patch('saleor.registration.views.now')+ @patch('saleor.registration.views.EmailChangeRequest.objects.get')def test_another_user_logged_out(self, get, now):# user requests email change@@ -301,8 +303,8 @@ class EmailChangeTestCase(TestCase):self.assertFalse(request.user.is_authenticated())token_object.delete.assert_not_called()- @patch('shop.registration.views.now')- @patch('shop.registration.views.EmailChangeRequest.objects.get')+ @patch('saleor.registration.views.now')+ @patch('saleor.registration.views.EmailChangeRequest.objects.get')def test_user_logged_in(self, get, now):# user requests email changediff --git a/shop/registration/urls.py b/saleor/registration/urls.pysimilarity index 100%rename from shop/registration/urls.pyrename to saleor/registration/urls.pydiff --git a/shop/registration/utils.py b/saleor/registration/utils.pysimilarity index 99%rename from shop/registration/utils.pyrename to saleor/registration/utils.pyindex f569b9ed8e..c9855b97ce 100644--- a/shop/registration/utils.py+++ b/saleor/registration/utils.py@@ -14,7 +14,7 @@ import requestsGOOGLE, FACEBOOK = 'google', 'facebook'JSON_MIME_TYPE = 'application/json'-logger = logging.getLogger('shop.registration')+logger = logging.getLogger('saleor.registration')User = get_user_model()diff --git a/shop/registration/views.py b/saleor/registration/views.pysimilarity index 100%rename from shop/registration/views.pyrename to saleor/registration/views.pydiff --git a/shop/settings.py b/saleor/settings.pysimilarity index 85%rename from shop/settings.pyrename to saleor/settings.pyindex 05fbcbb0be..17f1c57697 100644--- a/shop/settings.py+++ b/saleor/settings.py@@ -7,9 +7,9 @@ SITE_ID = 1PROJECT_ROOT = os.path.normpath(os.path.join(os.path.dirname(__file__), '..'))-ROOT_URLCONF = 'shop.urls'+ROOT_URLCONF = 'saleor.urls'-WSGI_APPLICATION = 'shop.wsgi.application'+WSGI_APPLICATION = 'saleor.wsgi.application'ADMINS = (# ('Your Name', '[email protected]'),@@ -36,7 +36,7 @@ MEDIA_URL = '/media/'STATIC_ROOT = os.path.join(PROJECT_ROOT, 'static')STATIC_URL = '/static/'STATICFILES_DIRS = [- os.path.join(PROJECT_ROOT, 'shop', 'static')+ os.path.join(PROJECT_ROOT, 'saleor', 'static')]STATICFILES_FINDERS = ['django.contrib.staticfiles.finders.FileSystemFinder',@@ -62,8 +62,8 @@ MIDDLEWARE_CLASSES = ['django.middleware.csrf.CsrfViewMiddleware','django.contrib.auth.middleware.AuthenticationMiddleware','django.contrib.messages.middleware.MessageMiddleware',- 'shop.cart.middleware.CartMiddleware',- 'shop.core.middleware.CheckHTML'+ 'saleor.cart.middleware.CartMiddleware',+ 'saleor.core.middleware.CheckHTML']TEMPLATE_CONTEXT_PROCESSORS = [@@ -75,9 +75,9 @@ TEMPLATE_CONTEXT_PROCESSORS = ['django.core.context_processors.tz','django.contrib.messages.context_processors.messages','django.core.context_processors.request',- 'shop.core.context_processors.googe_analytics',- 'shop.core.context_processors.canonical_hostname',- 'shop.core.context_processors.default_currency'+ 'saleor.core.context_processors.googe_analytics',+ 'saleor.core.context_processors.canonical_hostname',+ 'saleor.core.context_processors.default_currency']INSTALLED_APPS = [@@ -99,14 +99,14 @@ INSTALLED_APPS = ['south',# Local apps- 'shop.cart',- 'shop.checkout',- 'shop.core',- 'shop.order',- 'shop.payment',- 'shop.product',- 'shop.registration',- 'shop.userprofile'+ 'saleor.cart',+ 'saleor.checkout',+ 'saleor.core',+ 'saleor.order',+ 'saleor.payment',+ 'saleor.product',+ 'saleor.registration',+ 'saleor.userprofile']LOGGING = {@@ -148,7 +148,7 @@ LOGGING = {'level': 'ERROR','propagate': True},- 'shop': {+ 'saleor': {'handlers': ['console'],'level': 'DEBUG','propagate': True@@ -157,9 +157,9 @@ LOGGING = {}AUTHENTICATION_BACKENDS = (- 'shop.registration.backends.EmailPasswordBackend',- 'shop.registration.backends.ExternalLoginBackend',- 'shop.registration.backends.TrivialBackend'+ 'saleor.registration.backends.EmailPasswordBackend',+ 'saleor.registration.backends.ExternalLoginBackend',+ 'saleor.registration.backends.TrivialBackend')AUTH_USER_MODEL = 'userprofile.User'diff --git a/shop/static/css/bootstrap-theme.css b/saleor/static/css/bootstrap-theme.csssimilarity index 100%rename from shop/static/css/bootstrap-theme.cssrename to saleor/static/css/bootstrap-theme.cssdiff --git a/shop/static/css/bootstrap-theme.min.css b/saleor/static/css/bootstrap-theme.min.csssimilarity index 100%rename from shop/static/css/bootstrap-theme.min.cssrename to saleor/static/css/bootstrap-theme.min.cssdiff --git a/shop/static/css/bootstrap.css b/saleor/static/css/bootstrap.csssimilarity index 100%rename from shop/static/css/bootstrap.cssrename to saleor/static/css/bootstrap.cssdiff --git a/shop/static/css/bootstrap.min.css b/saleor/static/css/bootstrap.min.csssimilarity index 100%rename from shop/static/css/bootstrap.min.cssrename to saleor/static/css/bootstrap.min.cssdiff --git a/shop/static/fonts/glyphicons-halflings-regular.eot b/saleor/static/fonts/glyphicons-halflings-regular.eotsimilarity index 100%rename from shop/static/fonts/glyphicons-halflings-regular.eotrename to saleor/static/fonts/glyphicons-halflings-regular.eotdiff --git a/shop/static/fonts/glyphicons-halflings-regular.svg b/saleor/static/fonts/glyphicons-halflings-regular.svgsimilarity index 100%rename from shop/static/fonts/glyphicons-halflings-regular.svgrename to saleor/static/fonts/glyphicons-halflings-regular.svgdiff --git a/shop/static/fonts/glyphicons-halflings-regular.ttf b/saleor/static/fonts/glyphicons-halflings-regular.ttfsimilarity index 100%rename from shop/static/fonts/glyphicons-halflings-regular.ttfrename to saleor/static/fonts/glyphicons-halflings-regular.ttfdiff --git a/shop/static/fonts/glyphicons-halflings-regular.woff b/saleor/static/fonts/glyphicons-halflings-regular.woffsimilarity index 100%rename from shop/static/fonts/glyphicons-halflings-regular.woffrename to saleor/static/fonts/glyphicons-halflings-regular.woffdiff --git a/shop/static/img/glyphicons-halflings-white.png b/saleor/static/img/glyphicons-halflings-white.pngsimilarity index 100%rename from shop/static/img/glyphicons-halflings-white.pngrename to saleor/static/img/glyphicons-halflings-white.pngdiff --git a/shop/static/img/glyphicons-halflings.png b/saleor/static/img/glyphicons-halflings.pngsimilarity index 100%rename from shop/static/img/glyphicons-halflings.pngrename to saleor/static/img/glyphicons-halflings.pngdiff --git a/shop/static/js/lib/bootstrap.js b/saleor/static/js/lib/bootstrap.jssimilarity index 100%rename from shop/static/js/lib/bootstrap.jsrename to saleor/static/js/lib/bootstrap.jsdiff --git a/shop/static/js/lib/bootstrap.min.js b/saleor/static/js/lib/bootstrap.min.jssimilarity index 100%rename from shop/static/js/lib/bootstrap.min.jsrename to saleor/static/js/lib/bootstrap.min.jsdiff --git a/shop/static/js/lib/less.js b/saleor/static/js/lib/less.jssimilarity index 100%rename from shop/static/js/lib/less.jsrename to saleor/static/js/lib/less.jsdiff --git a/shop/static/less/style.less b/saleor/static/less/style.lesssimilarity index 100%rename from shop/static/less/style.lessrename to saleor/static/less/style.lessdiff --git a/shop/test_settings.py b/saleor/test_settings.pysimilarity index 100%rename from shop/test_settings.pyrename to saleor/test_settings.pydiff --git a/saleor/tests.py b/saleor/tests.pynew file mode 100644index 0000000000..77345a11b2--- /dev/null+++ b/saleor/tests.py@@ -0,0 +1,18 @@+from unittest import TestSuite, TestLoader++TEST_MODULES = [+ 'saleor.cart.tests',+ 'saleor.checkout.tests',+ 'saleor.communication.tests',+ 'saleor.core.tests',+ #'saleor.delivery.tests',+ 'saleor.order.tests',+ #'saleor.payment.tests',+ #'saleor.product.tests',+ 'saleor.registration.tests',+ 'saleor.userprofile.tests']++suite = TestSuite()+loader = TestLoader()+for module in TEST_MODULES:+ suite.addTests(loader.loadTestsFromName(module))diff --git a/shop/urls.py b/saleor/urls.pysimilarity index 100%rename from shop/urls.pyrename to saleor/urls.pydiff --git a/shop/userprofile/__init__.py b/saleor/userprofile/__init__.pysimilarity index 100%rename from shop/userprofile/__init__.pyrename to saleor/userprofile/__init__.pydiff --git a/shop/userprofile/admin.py b/saleor/userprofile/admin.pysimilarity index 100%rename from shop/userprofile/admin.pyrename to saleor/userprofile/admin.pydiff --git a/shop/userprofile/forms.py b/saleor/userprofile/forms.pysimilarity index 100%rename from shop/userprofile/forms.pyrename to saleor/userprofile/forms.pydiff --git a/shop/userprofile/management/__init__.py b/saleor/userprofile/management/__init__.pysimilarity index 100%rename from shop/userprofile/management/__init__.pyrename to saleor/userprofile/management/__init__.pydiff --git a/shop/userprofile/management/commands/__init__.py b/saleor/userprofile/management/commands/__init__.pysimilarity index 100%rename from shop/userprofile/management/commands/__init__.pyrename to saleor/userprofile/management/commands/__init__.pydiff --git a/shop/userprofile/management/commands/changepassword.py b/saleor/userprofile/management/commands/changepassword.pysimilarity index 100%rename from shop/userprofile/management/commands/changepassword.pyrename to saleor/userprofile/management/commands/changepassword.pydiff --git a/shop/userprofile/management/commands/createsuperuser.py b/saleor/userprofile/management/commands/createsuperuser.pysimilarity index 100%rename from shop/userprofile/management/commands/createsuperuser.pyrename to saleor/userprofile/management/commands/createsuperuser.pydiff --git a/shop/userprofile/models.py b/saleor/userprofile/models.pysimilarity index 100%rename from shop/userprofile/models.pyrename to saleor/userprofile/models.pydiff --git a/shop/userprofile/templates/userprofile/address-delete.html b/saleor/userprofile/templates/userprofile/address-delete.htmlsimilarity index 100%rename from shop/userprofile/templates/userprofile/address-delete.htmlrename to saleor/userprofile/templates/userprofile/address-delete.htmldiff --git a/shop/userprofile/templates/userprofile/address-edit.html b/saleor/userprofile/templates/userprofile/address-edit.htmlsimilarity index 100%rename from shop/userprofile/templates/userprofile/address-edit.htmlrename to saleor/userprofile/templates/userprofile/address-edit.htmldiff --git a/shop/userprofile/templates/userprofile/details.html b/saleor/userprofile/templates/userprofile/details.htmlsimilarity index 100%rename from shop/userprofile/templates/userprofile/details.htmlrename to saleor/userprofile/templates/userprofile/details.htmldiff --git a/shop/userprofile/templates/userprofile/orders.html b/saleor/userprofile/templates/userprofile/orders.htmlsimilarity index 100%rename from shop/userprofile/templates/userprofile/orders.htmlrename to saleor/userprofile/templates/userprofile/orders.htmldiff --git a/shop/userprofile/tests.py b/saleor/userprofile/tests.pysimilarity index 100%rename from shop/userprofile/tests.pyrename to saleor/userprofile/tests.pydiff --git a/shop/userprofile/urls.py b/saleor/userprofile/urls.pysimilarity index 100%rename from shop/userprofile/urls.pyrename to saleor/userprofile/urls.pydiff --git a/shop/userprofile/views.py b/saleor/userprofile/views.pysimilarity index 100%rename from shop/userprofile/views.pyrename to saleor/userprofile/views.pydiff --git a/shop/wsgi.py b/saleor/wsgi.pysimilarity index 94%rename from shop/wsgi.pyrename to saleor/wsgi.pyindex 383d859737..69d2868f85 100644--- a/shop/wsgi.py+++ b/saleor/wsgi.py@@ -15,7 +15,7 @@ framework."""import os-os.environ.setdefault("DJANGO_SETTINGS_MODULE", "shop.settings")+os.environ.setdefault("DJANGO_SETTINGS_MODULE", "saleor.settings")# This application object is used by any WSGI server configured to use this# file. This includes Django's development server, if the WSGI_APPLICATIONdiff --git a/setup.py b/setup.pyindex 465c981d96..d1b5d614e1 100755--- a/setup.py+++ b/setup.py@@ -2,7 +2,7 @@from setuptools import setup, find_packages, Commandimport os-os.environ.setdefault('DJANGO_SETTINGS_MODULE', 'shop.settings')+os.environ.setdefault('DJANGO_SETTINGS_MODULE', 'saleor.settings')class Command(Command):@@ -23,18 +23,18 @@ setup(include_package_data=True,install_requires=['Django>=1.5',- 'django-images>=0.3.2,<-0.4a0',+ 'django-images>=0.3.2.1,<-0.4a0','django-mptt>=0.5',- 'django-payments>=0.3.4.1,<0.4a0',- 'django-prices>=0.2.5,<0.3a0',+ 'django-payments>=0.3.4.3,<0.4a0',+ 'django-prices>=0.2.6,<0.3a0','prices>=0.4.2,<0.5a0','satchless>=1.0.4,<1.1a0','South>=0.7.6','requests>=1.2.0','unidecode'],entry_points={- 'console_scripts': ['saleor = shop:manage']},+ 'console_scripts': ['saleor = saleor:manage']},tests_require=['mock==1.0.1','purl>=0.4.1'],- test_suite='shop.tests.suite')+ test_suite='saleor.tests.suite')diff --git a/shop/tests.py b/shop/tests.pydeleted file mode 100644index bd71fabef5..0000000000--- a/shop/tests.py+++ /dev/null@@ -1,18 +0,0 @@-from unittest import TestSuite, TestLoader--TEST_MODULES = [- 'shop.cart.tests',- 'shop.checkout.tests',- 'shop.communication.tests',- 'shop.core.tests',- #'shop.delivery.tests',- 'shop.order.tests',- #'shop.payment.tests',- #'shop.product.tests',- 'shop.registration.tests',- 'shop.userprofile.tests']--suite = TestSuite()-loader = TestLoader()-for module in TEST_MODULES:- suite.addTests(loader.loadTestsFromName(module))