Saleor Core: the high performance, composable, headless commerce API.
Python cartcheckoutcommercecomposablee-commerceecommercegraphqlheadlessheadless-commercemultichannelomsorder-managementpaymentspimpythonshopshopping-cartstore
Make the project self-contained
Patryk Zawadzki087f362e086d
diff --git a/cart/urls.py b/cart/urls.pydeleted file mode 100644index 5342435410..0000000000--- a/cart/urls.py+++ /dev/null@@ -1,6 +0,0 @@-from django.conf.urls import patterns, url---urlpatterns = patterns('cart.views',- url(r'^$', 'index', name='index'),-)diff --git a/checkout/urls.py b/checkout/urls.pydeleted file mode 100644index 9eabdc99a3..0000000000--- a/checkout/urls.py+++ /dev/null@@ -1,7 +0,0 @@-from django.conf.urls import patterns, url---urlpatterns = patterns('checkout.views',- url(r'^$', 'details', kwargs={'step': None}, name='index'),- url(r'^(?P<step>[a-z0-9-]+)/$', 'details', name='details')-)diff --git a/manage.py b/manage.pyindex de46e4e0a3..32f2695e25 100755--- a/manage.py+++ b/manage.py@@ -3,7 +3,7 @@ import osimport sysif __name__ == "__main__":- os.environ.setdefault("DJANGO_SETTINGS_MODULE", "saleor.settings")+ os.environ.setdefault("DJANGO_SETTINGS_MODULE", "shop.settings")from django.core.management import execute_from_command_linediff --git a/order/urls.py b/order/urls.pydeleted file mode 100644index 50e84b25e4..0000000000--- a/order/urls.py+++ /dev/null@@ -1,10 +0,0 @@-from django.conf.urls import patterns, url, include--TOKEN_PATTERN = ('(?P<token>[0-9a-z]{8}-[0-9a-z]{4}-[0-9a-z]{4}-[0-9a-z]{4}'- '-[0-9a-z]{12})')--urlpatterns = patterns('order.views',- url(r'^%s/$' % TOKEN_PATTERN, 'details', name='details'),- url(r'^%s/success/$' % TOKEN_PATTERN, 'success', name='success'),- url(r'^%s/' % TOKEN_PATTERN, include('payment.urls', namespace='payment'))-)diff --git a/payment/urls.py b/payment/urls.pydeleted file mode 100644index 009e9ba029..0000000000--- a/payment/urls.py+++ /dev/null@@ -1,8 +0,0 @@-from django.conf.urls import patterns, url---urlpatterns = patterns('payment.views',- url(r'^payment/$', 'index', name='index'),- url(r'^remove/$', 'delete', name='delete'),- url(r'^(?P<variant>[a-z-]+)/$', 'details', name='details')-)diff --git a/product/urls.py b/product/urls.pydeleted file mode 100644index 78285969f3..0000000000--- a/product/urls.py+++ /dev/null@@ -1,9 +0,0 @@-from django.conf.urls import patterns, url---urlpatterns = patterns('product.views',- url(r'^(?P<slug>[a-z0-9-]+?)-(?P<product_id>[0-9]+)/$', 'product_details',- name='details'),- url(r'^category/(?P<slug>[a-z0-9-]+?)/$', 'category_index',- name='category')-)diff --git a/registration/urls.py b/registration/urls.pydeleted file mode 100644index 2f6be6d6a7..0000000000--- a/registration/urls.py+++ /dev/null@@ -1,25 +0,0 @@-from django.conf.urls import patterns, url---urlpatterns = patterns(- '',- url(r'^login/$', 'registration.views.login', name='login'),- url(r'^logout/$', 'registration.views.logout', name='logout'),- url(r'^oauth_callback/(?P<service>\w+)/$',- 'registration.views.oauth_callback',- name='oauth_callback'),- url(r'^change_password/$',- 'registration.views.change_password',- name='change_password'),- url(r'^request_email_confirmation/$',- 'registration.views.request_email_confirmation',- name='request_email_confirmation'),- url(r'^confirm_email/(?P<token>\w+)/$',- 'registration.views.confirm_email',- name='confirm_email'),- url(r'^request_email_change/$',- 'registration.views.request_email_change',- name='request_email_change'),- url(r'^change_email/(?P<token>\w+)/$',- 'registration.views.change_email',- name='change_email'))diff --git a/saleor/migrations/0001_initial.py b/saleor/migrations/0001_initial.pydeleted file mode 100644index b482396cf1..0000000000--- a/saleor/migrations/0001_initial.py+++ /dev/null@@ -1,86 +0,0 @@-# -*- coding: utf-8 -*--import datetime-from south.db import db-from south.v2 import SchemaMigration-from django.db import models---class Migration(SchemaMigration):-- def forwards(self, orm):- # Adding model 'User'- db.create_table(u'saleor_user', (- (u'id', self.gf('django.db.models.fields.AutoField')(primary_key=True)),- ('password', self.gf('django.db.models.fields.CharField')(max_length=128)),- ('last_login', self.gf('django.db.models.fields.DateTimeField')(default=datetime.datetime.now)),- ('is_superuser', self.gf('django.db.models.fields.BooleanField')(default=False)),- ('email', self.gf('django.db.models.fields.EmailField')(unique=True, max_length=75)),- ('is_staff', self.gf('django.db.models.fields.BooleanField')(default=False)),- ('is_active', self.gf('django.db.models.fields.BooleanField')(default=True)),- ('date_joined', self.gf('django.db.models.fields.DateTimeField')(default=datetime.datetime.now)),- ))- db.send_create_signal(u'saleor', ['User'])-- # Adding M2M table for field groups on 'User'- db.create_table(u'saleor_user_groups', (- ('id', models.AutoField(verbose_name='ID', primary_key=True, auto_created=True)),- ('user', models.ForeignKey(orm[u'saleor.user'], null=False)),- ('group', models.ForeignKey(orm[u'auth.group'], null=False))- ))- db.create_unique(u'saleor_user_groups', ['user_id', 'group_id'])-- # Adding M2M table for field user_permissions on 'User'- db.create_table(u'saleor_user_user_permissions', (- ('id', models.AutoField(verbose_name='ID', primary_key=True, auto_created=True)),- ('user', models.ForeignKey(orm[u'saleor.user'], null=False)),- ('permission', models.ForeignKey(orm[u'auth.permission'], null=False))- ))- db.create_unique(u'saleor_user_user_permissions', ['user_id', 'permission_id'])-- def backwards(self, orm):- # Deleting model 'User'- db.delete_table(u'saleor_user')-- # Removing M2M table for field groups on 'User'- db.delete_table('saleor_user_groups')-- # Removing M2M table for field user_permissions on 'User'- db.delete_table('saleor_user_user_permissions')-- models = {- u'auth.group': {- 'Meta': {'object_name': 'Group'},- u'id': ('django.db.models.fields.AutoField', [], {'primary_key': 'True'}),- 'name': ('django.db.models.fields.CharField', [], {'unique': 'True', 'max_length': '80'}),- 'permissions': ('django.db.models.fields.related.ManyToManyField', [], {'to': u"orm['auth.Permission']", 'symmetrical': 'False', 'blank': 'True'})- },- u'auth.permission': {- 'Meta': {'ordering': "(u'content_type__app_label', u'content_type__model', u'codename')", 'unique_together': "((u'content_type', u'codename'),)", 'object_name': 'Permission'},- 'codename': ('django.db.models.fields.CharField', [], {'max_length': '100'}),- 'content_type': ('django.db.models.fields.related.ForeignKey', [], {'to': u"orm['contenttypes.ContentType']"}),- u'id': ('django.db.models.fields.AutoField', [], {'primary_key': 'True'}),- 'name': ('django.db.models.fields.CharField', [], {'max_length': '50'})- },- u'contenttypes.contenttype': {- 'Meta': {'ordering': "('name',)", 'unique_together': "(('app_label', 'model'),)", 'object_name': 'ContentType', 'db_table': "'django_content_type'"},- 'app_label': ('django.db.models.fields.CharField', [], {'max_length': '100'}),- u'id': ('django.db.models.fields.AutoField', [], {'primary_key': 'True'}),- 'model': ('django.db.models.fields.CharField', [], {'max_length': '100'}),- 'name': ('django.db.models.fields.CharField', [], {'max_length': '100'})- },- u'saleor.user': {- 'Meta': {'object_name': 'User'},- 'date_joined': ('django.db.models.fields.DateTimeField', [], {'default': 'datetime.datetime.now'}),- 'email': ('django.db.models.fields.EmailField', [], {'unique': 'True', 'max_length': '75'}),- 'groups': ('django.db.models.fields.related.ManyToManyField', [], {'to': u"orm['auth.Group']", 'symmetrical': 'False', 'blank': 'True'}),- u'id': ('django.db.models.fields.AutoField', [], {'primary_key': 'True'}),- 'is_active': ('django.db.models.fields.BooleanField', [], {'default': 'True'}),- 'is_staff': ('django.db.models.fields.BooleanField', [], {'default': 'False'}),- 'is_superuser': ('django.db.models.fields.BooleanField', [], {'default': 'False'}),- 'last_login': ('django.db.models.fields.DateTimeField', [], {'default': 'datetime.datetime.now'}),- 'password': ('django.db.models.fields.CharField', [], {'max_length': '128'}),- 'user_permissions': ('django.db.models.fields.related.ManyToManyField', [], {'to': u"orm['auth.Permission']", 'symmetrical': 'False', 'blank': 'True'})- }- }-- complete_apps = ['saleor']diff --git a/saleor/migrations/0002_auto__del_field_user_is_superuser.py b/saleor/migrations/0002_auto__del_field_user_is_superuser.pydeleted file mode 100644index 07ac6b3eb8..0000000000--- a/saleor/migrations/0002_auto__del_field_user_is_superuser.py+++ /dev/null@@ -1,57 +0,0 @@-# -*- coding: utf-8 -*--import datetime-from south.db import db-from south.v2 import SchemaMigration-from django.db import models---class Migration(SchemaMigration):-- def forwards(self, orm):- # Deleting field 'User.is_superuser'- db.delete_column(u'saleor_user', 'is_superuser')-- # Removing M2M table for field groups on 'User'- db.delete_table('saleor_user_groups')-- # Removing M2M table for field user_permissions on 'User'- db.delete_table('saleor_user_user_permissions')--- def backwards(self, orm):- # Adding field 'User.is_superuser'- db.add_column(u'saleor_user', 'is_superuser',- self.gf('django.db.models.fields.BooleanField')(default=False),- keep_default=False)-- # Adding M2M table for field groups on 'User'- db.create_table(u'saleor_user_groups', (- ('id', models.AutoField(verbose_name='ID', primary_key=True, auto_created=True)),- ('user', models.ForeignKey(orm[u'saleor.user'], null=False)),- ('group', models.ForeignKey(orm[u'auth.group'], null=False))- ))- db.create_unique(u'saleor_user_groups', ['user_id', 'group_id'])-- # Adding M2M table for field user_permissions on 'User'- db.create_table(u'saleor_user_user_permissions', (- ('id', models.AutoField(verbose_name='ID', primary_key=True, auto_created=True)),- ('user', models.ForeignKey(orm[u'saleor.user'], null=False)),- ('permission', models.ForeignKey(orm[u'auth.permission'], null=False))- ))- db.create_unique(u'saleor_user_user_permissions', ['user_id', 'permission_id'])--- models = {- u'saleor.user': {- 'Meta': {'object_name': 'User'},- 'date_joined': ('django.db.models.fields.DateTimeField', [], {'default': 'datetime.datetime.now'}),- 'email': ('django.db.models.fields.EmailField', [], {'unique': 'True', 'max_length': '75'}),- u'id': ('django.db.models.fields.AutoField', [], {'primary_key': 'True'}),- 'is_active': ('django.db.models.fields.BooleanField', [], {'default': 'False'}),- 'is_staff': ('django.db.models.fields.BooleanField', [], {'default': 'False'}),- 'last_login': ('django.db.models.fields.DateTimeField', [], {'default': 'datetime.datetime.now'}),- 'password': ('django.db.models.fields.CharField', [], {'max_length': '128'})- }- }-- complete_apps = ['saleor']\ No newline at end of filediff --git a/saleor/migrations/0003_auto__del_user.py b/saleor/migrations/0003_auto__del_user.pydeleted file mode 100644index 9d5948e33f..0000000000--- a/saleor/migrations/0003_auto__del_user.py+++ /dev/null@@ -1,33 +0,0 @@-# -*- coding: utf-8 -*--import datetime-from south.db import db-from south.v2 import SchemaMigration-from django.db import models---class Migration(SchemaMigration):-- def forwards(self, orm):- # Deleting model 'User'- db.delete_table(u'saleor_user')--- def backwards(self, orm):- # Adding model 'User'- db.create_table(u'saleor_user', (- ('is_staff', self.gf('django.db.models.fields.BooleanField')(default=False)),- (u'id', self.gf('django.db.models.fields.AutoField')(primary_key=True)),- ('last_login', self.gf('django.db.models.fields.DateTimeField')(default=datetime.datetime.now)),- ('password', self.gf('django.db.models.fields.CharField')(max_length=128)),- ('is_active', self.gf('django.db.models.fields.BooleanField')(default=False)),- ('email', self.gf('django.db.models.fields.EmailField')(max_length=75, unique=True)),- ('date_joined', self.gf('django.db.models.fields.DateTimeField')(default=datetime.datetime.now)),- ))- db.send_create_signal(u'saleor', ['User'])--- models = {-- }-- complete_apps = ['saleor']\ No newline at end of filediff --git a/saleor/urls.py b/saleor/urls.pydeleted file mode 100644index 05d3855fe0..0000000000--- a/saleor/urls.py+++ /dev/null@@ -1,27 +0,0 @@-from django.conf import settings-from django.conf.urls import patterns, url, include-from django.contrib import admin---admin.autodiscover()--urlpatterns = patterns(- '',- url(r'^$', 'saleor.views.home', name='home'),- url(r'^account/', include('registration.urls', namespace='registration')),- url(r'^admin/', include(admin.site.urls)),- url(r'^cart/', include('cart.urls', namespace='cart')),- url(r'^checkout/', include('checkout.urls', namespace='checkout')),- url(r'^images/', include('django_images.urls')),- url(r'^order/', include('order.urls', namespace='order')),- url(r'^products/', include('product.urls', namespace='product')),- url(r'^profile/', include('userprofile.urls', namespace='profile')),- url(r'^', include('payments.urls'))-)--if settings.DEBUG:- # static files (images, css, javascript, etc.)- urlpatterns += patterns(- '',- url(r'^media/(?P<path>.*)$', 'django.views.static.serve',- {'document_root': settings.MEDIA_ROOT}))diff --git a/setup.py b/setup.pyindex e122d2bc99..9fe5c07e41 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', 'saleor.settings')+os.environ.setdefault('DJANGO_SETTINGS_MODULE', 'shop.settings')class Command(Command):@@ -33,7 +33,7 @@ setup('requests>=1.2.0','unidecode'],entry_points={- 'console_scripts': ['saleor = saleor:manage']},+ 'console_scripts': ['saleor = shop:manage']},tests_require=['mock==1.0.1','purl>=0.4.1',diff --git a/saleor/__init__.py b/shop/__init__.pysimilarity index 70%rename from saleor/__init__.pyrename to shop/__init__.pyindex 4fe58bb95c..33f8e739b5 100644--- a/saleor/__init__.py+++ b/shop/__init__.py@@ -6,5 +6,5 @@ def manage():import sysfrom django.core.management import execute_from_command_line- os.environ.setdefault("DJANGO_SETTINGS_MODULE", "saleor.settings")+ os.environ.setdefault("DJANGO_SETTINGS_MODULE", "shop.settings")execute_from_command_line(sys.argv)diff --git a/cart/__init__.py b/shop/cart/__init__.pysimilarity index 97%rename from cart/__init__.pyrename to shop/cart/__init__.pyindex cf0b7b4917..0c9a6e8694 100755--- a/cart/__init__.py+++ b/shop/cart/__init__.py@@ -2,8 +2,8 @@ from django.utils.translation import pgettextfrom satchless import cartfrom satchless.item import ItemSet, ClassifyingPartitioner-from delivery import DummyShipping, DigitalDelivery-from product.models import DigitalShip+from ..delivery import DummyShipping, DigitalDelivery+from ..product.models import DigitalShipclass BaseGroup(list, ItemSet):diff --git a/cart/forms.py b/shop/cart/forms.pysimilarity index 100%rename from cart/forms.pyrename to shop/cart/forms.pydiff --git a/cart/middleware.py b/shop/cart/middleware.pysimilarity index 96%rename from cart/middleware.pyrename to shop/cart/middleware.pyindex ec846b9cd1..44705fd239 100644--- a/cart/middleware.py+++ b/shop/cart/middleware.py@@ -1,4 +1,4 @@-from cart import Cart+from . import Cartclass CartMiddleware(object):diff --git a/cart/migrations/0001_initial.py b/shop/cart/migrations/0001_initial.pysimilarity index 100%rename from cart/migrations/0001_initial.pyrename to shop/cart/migrations/0001_initial.pydiff --git a/cart/migrations/__init__.py b/shop/cart/migrations/__init__.pysimilarity index 100%rename from cart/migrations/__init__.pyrename to shop/cart/migrations/__init__.pydiff --git a/cart/models.py b/shop/cart/models.pysimilarity index 100%rename from cart/models.pyrename to shop/cart/models.pydiff --git a/cart/templates/cart/index.html b/shop/cart/templates/cart/index.htmlsimilarity index 100%rename from cart/templates/cart/index.htmlrename to shop/cart/templates/cart/index.htmldiff --git a/cart/tests.py b/shop/cart/tests.pysimilarity index 96%rename from cart/tests.pyrename to shop/cart/tests.pyindex 838eaff443..6f90aa24bd 100755--- a/cart/tests.py+++ b/shop/cart/tests.py@@ -1,13 +1,14 @@-from cart import Cart, BaseGroup-from cart.forms import AddToCartForm, ReplaceCartLineForm, \- ReplaceCartLineFormSet-from delivery import BaseDeliveryfrom django.test import TestCasefrom prices import Price-from product.models import Product, StockedProduct, PhysicalProductfrom satchless.item import InsufficientStockfrom satchless.cart import CartLine+from . import Cart, BaseGroup+from .forms import AddToCartForm, ReplaceCartLineForm, \+ ReplaceCartLineFormSet+from ..delivery import BaseDelivery+from ..product.models import Product, StockedProduct, PhysicalProduct+__all__ = ['CartTest', 'GroupTest', 'AddToCartFormTest']diff --git a/shop/cart/urls.py b/shop/cart/urls.pynew file mode 100644index 0000000000..a84079e4e9--- /dev/null+++ b/shop/cart/urls.py@@ -0,0 +1,9 @@+from django.conf.urls import patterns, url++from . import views+++urlpatterns = patterns(+ '',+ url(r'^$', views.index, name='index')+)diff --git a/cart/views.py b/shop/cart/views.pysimilarity index 100%rename from cart/views.pyrename to shop/cart/views.pydiff --git a/checkout/__init__.py b/shop/checkout/__init__.pysimilarity index 96%rename from checkout/__init__.pyrename to shop/checkout/__init__.pyindex 6b5fb0e2c8..7ffaa2d2a8 100644--- a/checkout/__init__.py+++ b/shop/checkout/__init__.py@@ -1,10 +1,12 @@-from .steps import (BillingAddressStep, ShippingStep, DigitalDeliveryStep,- SummaryStep)-from cart import CartPartitioner, DigitalGroup, remove_cart_from_requestfrom collections import defaultdict-from order.models import Order+from satchless.process import ProcessManager+from .steps import (BillingAddressStep, ShippingStep, DigitalDeliveryStep,+ SummaryStep)+from ..cart import CartPartitioner, DigitalGroup, remove_cart_from_request+from ..order.models import Order+STORAGE_SESSION_KEY = 'checkout_storage'diff --git a/checkout/forms.py b/shop/checkout/forms.pysimilarity index 94%rename from checkout/forms.pyrename to shop/checkout/forms.pyindex 3c19864fe0..120ca7e642 100644--- a/checkout/forms.py+++ b/shop/checkout/forms.py@@ -2,8 +2,9 @@ from django import formsfrom django.contrib.auth.models import AnonymousUserfrom django.core import validatorsfrom django.core.exceptions import ValidationError-from order.models import DigitalDeliveryGroup-from userprofile.forms import AddressForm++from ..order.models import DigitalDeliveryGroup+from ..userprofile.forms import AddressFormclass ShippingForm(AddressForm):diff --git a/checkout/models.py b/shop/checkout/models.pysimilarity index 100%rename from checkout/models.pyrename to shop/checkout/models.pydiff --git a/checkout/steps.py b/shop/checkout/steps.pysimilarity index 96%rename from checkout/steps.pyrename to shop/checkout/steps.pyindex 36980d6781..67a18d5581 100644--- a/checkout/steps.py+++ b/shop/checkout/steps.py@@ -1,15 +1,15 @@from django.forms.models import model_to_dict-from checkout.forms import AnonymousEmailFormfrom django.core.exceptions import ValidationErrorfrom django.db import modelsfrom django.shortcuts import redirect-from order.models import DigitalDeliveryGroup, ShippedDeliveryGroup-from saleor.utils import BaseStepfrom satchless.process import InvalidData-from userprofile.forms import AddressForm, UserAddressesForm-from userprofile.models import Addressfrom .forms import DigitalDeliveryForm, DeliveryForm+from ..checkout.forms import AnonymousEmailForm+from ..core.utils import BaseStep+from ..order.models import DigitalDeliveryGroup, ShippedDeliveryGroup+from ..userprofile.forms import AddressForm, UserAddressesForm+from ..userprofile.models import Addressclass BaseCheckoutStep(BaseStep):diff --git a/checkout/templates/checkout/address.html b/shop/checkout/templates/checkout/address.htmlsimilarity index 100%rename from checkout/templates/checkout/address.htmlrename to shop/checkout/templates/checkout/address.htmldiff --git a/checkout/templates/checkout/billing.html b/shop/checkout/templates/checkout/billing.htmlsimilarity index 100%rename from checkout/templates/checkout/billing.htmlrename to shop/checkout/templates/checkout/billing.htmldiff --git a/checkout/templates/checkout/details.html b/shop/checkout/templates/checkout/details.htmlsimilarity index 100%rename from checkout/templates/checkout/details.htmlrename to shop/checkout/templates/checkout/details.htmldiff --git a/checkout/templates/checkout/digitaldelivery.html b/shop/checkout/templates/checkout/digitaldelivery.htmlsimilarity index 100%rename from checkout/templates/checkout/digitaldelivery.htmlrename to shop/checkout/templates/checkout/digitaldelivery.htmldiff --git a/checkout/templates/checkout/shipping.html b/shop/checkout/templates/checkout/shipping.htmlsimilarity index 100%rename from checkout/templates/checkout/shipping.htmlrename to shop/checkout/templates/checkout/shipping.htmldiff --git a/checkout/templates/checkout/summary.html b/shop/checkout/templates/checkout/summary.htmlsimilarity index 100%rename from checkout/templates/checkout/summary.htmlrename to shop/checkout/templates/checkout/summary.htmldiff --git a/checkout/tests.py b/shop/checkout/tests.pysimilarity index 97%rename from checkout/tests.pyrename to shop/checkout/tests.pyindex a78dad7b1d..c4af16859e 100644--- a/checkout/tests.py+++ b/shop/checkout/tests.py@@ -1,11 +1,11 @@-from checkout import Checkout-from checkout.steps import BaseAddressStep-from delivery import DummyShippingfrom django.test import TestCasefrom mock import MagicMock, patch-from userprofile.models import Addressfrom . import BillingAddressStep, ShippingStep+from ..checkout import Checkout+from ..checkout.steps import BaseAddressStep+from ..delivery import DummyShipping+from ..userprofile.models import AddressNEW_ADDRESS = {'first_name': 'Test',diff --git a/shop/checkout/urls.py b/shop/checkout/urls.pynew file mode 100644index 0000000000..7d3df24519--- /dev/null+++ b/shop/checkout/urls.py@@ -0,0 +1,10 @@+from django.conf.urls import patterns, url++from . import views+++urlpatterns = patterns(+ '',+ url(r'^$', views.details, kwargs={'step': None}, name='index'),+ url(r'^(?P<step>[a-z0-9-]+)/$', views.details, name='details')+)diff --git a/checkout/views.py b/shop/checkout/views.pysimilarity index 93%rename from checkout/views.pyrename to shop/checkout/views.pyindex c9f508dde1..90c69b92f2 100644--- a/checkout/views.py+++ b/shop/checkout/views.py@@ -1,7 +1,8 @@-from checkout import Checkoutfrom django.http.response import Http404from django.shortcuts import redirect+from . import Checkout+def details(request, step):if not request.cart:diff --git a/communication/__init__.py b/shop/communication/__init__.pysimilarity index 100%rename from communication/__init__.pyrename to shop/communication/__init__.pydiff --git a/communication/mail.py b/shop/communication/mail.pysimilarity index 100%rename from communication/mail.pyrename to shop/communication/mail.pydiff --git a/communication/tests.py b/shop/communication/tests.pysimilarity index 88%rename from communication/tests.pyrename to shop/communication/tests.pyindex 24ba0894b4..3c8b4430a6 100644--- a/communication/tests.py+++ b/shop/communication/tests.py@@ -1,19 +1,18 @@-from communication.mail import SUBJECT, TEXT, HTML, send_email, render_blocks-+from django.template.loader_tags import BlockNodefrom mock import Mock, patch, sentinelfrom unittest2 import TestCase-from django.template.loader_tags import BlockNode+from .mail import SUBJECT, TEXT, HTML, send_email, render_blocksclass SendEmailTestCase(TestCase):def setUp(self):- patcher = patch('communication.mail.settings')+ patcher = patch('shop.communication.mail.settings')self.settings_mock = patcher.start()- patcher = patch('communication.mail.render_blocks')+ patcher = patch('shop.communication.mail.render_blocks')self.render_mock = patcher.start()- patcher = patch('communication.mail.EmailMultiAlternatives')+ patcher = patch('shop.communication.mail.EmailMultiAlternatives')self.email_mock = patcher.start()self.settings_mock.DEFAULT_FROM_EMAIL = sentinel.from_email@@ -54,8 +53,8 @@ class SendEmailTestCase(TestCase):class RenderBlocksTestCase(TestCase):- @patch('communication.mail.get_template')- @patch('communication.mail.Context')+ @patch('shop.communication.mail.get_template')+ @patch('shop.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/order/migrations/__init__.py b/shop/core/__init__.pysimilarity index 100%rename from order/migrations/__init__.pyrename to shop/core/__init__.pydiff --git a/saleor/context_processors.py b/shop/core/context_processors.pysimilarity index 100%rename from saleor/context_processors.pyrename to shop/core/context_processors.pydiff --git a/saleor/countries.py b/shop/core/countries.pysimilarity index 100%rename from saleor/countries.pyrename to shop/core/countries.pydiff --git a/saleor/middleware.py b/shop/core/middleware.pysimilarity index 100%rename from saleor/middleware.pyrename to shop/core/middleware.pydiff --git a/saleor/models.py b/shop/core/models.pysimilarity index 100%rename from saleor/models.pyrename to shop/core/models.pydiff --git a/saleor/templates/bootstrap/_field_horizontal.html b/shop/core/templates/bootstrap/_field_horizontal.htmlsimilarity index 100%rename from saleor/templates/bootstrap/_field_horizontal.htmlrename to shop/core/templates/bootstrap/_field_horizontal.htmldiff --git a/saleor/templates/bootstrap/_field_vertical.html b/shop/core/templates/bootstrap/_field_vertical.htmlsimilarity index 100%rename from saleor/templates/bootstrap/_field_vertical.htmlrename to shop/core/templates/bootstrap/_field_vertical.htmldiff --git a/saleor/templates/bootstrap/_non_field_errors.html b/shop/core/templates/bootstrap/_non_field_errors.htmlsimilarity index 100%rename from saleor/templates/bootstrap/_non_field_errors.htmlrename to shop/core/templates/bootstrap/_non_field_errors.htmldiff --git a/payment/migrations/__init__.py b/shop/core/templatetags/__init__.pysimilarity index 100%rename from payment/migrations/__init__.pyrename to shop/core/templatetags/__init__.pydiff --git a/saleor/templatetags/bootstrap.py b/shop/core/templatetags/bootstrap.pysimilarity index 100%rename from saleor/templatetags/bootstrap.pyrename to shop/core/templatetags/bootstrap.pydiff --git a/saleor/templatetags/saleor.py b/shop/core/templatetags/saleor.pysimilarity index 100%rename from saleor/templatetags/saleor.pyrename to shop/core/templatetags/saleor.pydiff --git a/saleor/tests/__init__.py b/shop/core/tests/__init__.pysimilarity index 100%rename from saleor/tests/__init__.pyrename to shop/core/tests/__init__.pydiff --git a/shop/core/urls.py b/shop/core/urls.pynew file mode 100644index 0000000000..616c8f41b4--- /dev/null+++ b/shop/core/urls.py@@ -0,0 +1,9 @@+from django.conf.urls import patterns, url++from . import views+++urlpatterns = patterns(+ '',+ url(r'^$', views.home, name='home')+)diff --git a/saleor/utils.py b/shop/core/utils/__init__.pysimilarity index 96%rename from saleor/utils.pyrename to shop/core/utils/__init__.pyindex 4a50eb1d87..f72790b6be 100644--- a/saleor/utils.py+++ b/shop/core/utils/__init__.py@@ -15,7 +15,8 @@ __all__ = ['BaseStep', 'CategoryChoiceField', 'build_absolute_uri']class CategoryChoiceField(forms.ModelChoiceField):def label_from_instance(self, obj):- level = getattr(obj, obj._mptt_meta.level_attr) # pylint: disable=W0212+ # pylint: disable=W0212+ level = getattr(obj, obj._mptt_meta.level_attr)indent = max(0, level - 1) * u'│'if obj.parent:last = ((obj.parent.rght - obj.rght == 1)diff --git a/utils/models.py b/shop/core/utils/models.pysimilarity index 100%rename from utils/models.pyrename to shop/core/utils/models.pydiff --git a/saleor/views.py b/shop/core/views.pysimilarity index 100%rename from saleor/views.pyrename to shop/core/views.pydiff --git a/delivery/__init__.py b/shop/delivery/__init__.pysimilarity index 100%rename from delivery/__init__.pyrename to shop/delivery/__init__.pydiff --git a/order/__init__.py b/shop/order/__init__.pysimilarity index 93%rename from order/__init__.pyrename to shop/order/__init__.pyindex 45fb28ece2..5b081928d3 100644--- a/order/__init__.py+++ b/shop/order/__init__.py@@ -1,7 +1,8 @@from django.shortcuts import get_object_or_404, redirect-from order.models import Orderfrom functools import wraps+from .models import Order+def check_order_status(func):diff --git a/order/admin.py b/shop/order/admin.pysimilarity index 98%rename from order/admin.pyrename to shop/order/admin.pyindex 472ef45c48..3e822a7d5e 100644--- a/order/admin.py+++ b/shop/order/admin.py@@ -1,9 +1,10 @@-from .models import Order, OrderedItemfrom django import formsfrom django.contrib import adminfrom django.contrib.admin.options import ModelAdminfrom django.forms.models import model_to_dict, BaseInlineFormSet-from payment.models import Payment++from .models import Order, OrderedItem+from ..payment.models import Paymentclass OrderModelAdmin(ModelAdmin):diff --git a/order/migrations/0001_initial.py b/shop/order/migrations/0001_initial.pysimilarity index 100%rename from order/migrations/0001_initial.pyrename to shop/order/migrations/0001_initial.pydiff --git a/order/migrations/0002_auto__del_field_order_billing_last_name__del_field_order_billing_count.py b/shop/order/migrations/0002_auto__del_field_order_billing_last_name__del_field_order_billing_count.pysimilarity index 100%rename from order/migrations/0002_auto__del_field_order_billing_last_name__del_field_order_billing_count.pyrename to shop/order/migrations/0002_auto__del_field_order_billing_last_name__del_field_order_billing_count.pydiff --git a/order/migrations/0003_auto__add_digitaldeliverygroup__add_shippeddeliverygroup__del_field_de.py b/shop/order/migrations/0003_auto__add_digitaldeliverygroup__add_shippeddeliverygroup__del_field_de.pysimilarity index 100%rename from order/migrations/0003_auto__add_digitaldeliverygroup__add_shippeddeliverygroup__del_field_de.pyrename to shop/order/migrations/0003_auto__add_digitaldeliverygroup__add_shippeddeliverygroup__del_field_de.pydiff --git a/order/migrations/0004_auto__chg_field_shippeddeliverygroup_address.py b/shop/order/migrations/0004_auto__chg_field_shippeddeliverygroup_address.pysimilarity index 100%rename from order/migrations/0004_auto__chg_field_shippeddeliverygroup_address.pyrename to shop/order/migrations/0004_auto__chg_field_shippeddeliverygroup_address.pydiff --git a/order/migrations/0005_auto__chg_field_shippeddeliverygroup_address__chg_field_order_billing_.py b/shop/order/migrations/0005_auto__chg_field_shippeddeliverygroup_address__chg_field_order_billing_.pysimilarity index 100%rename from order/migrations/0005_auto__chg_field_shippeddeliverygroup_address__chg_field_order_billing_.pyrename to shop/order/migrations/0005_auto__chg_field_shippeddeliverygroup_address__chg_field_order_billing_.pydiff --git a/order/migrations/0006_auto__del_field_order_payment_price__del_field_order_payment_type_desc.py b/shop/order/migrations/0006_auto__del_field_order_payment_price__del_field_order_payment_type_desc.pysimilarity index 100%rename from order/migrations/0006_auto__del_field_order_payment_price__del_field_order_payment_type_desc.pyrename to shop/order/migrations/0006_auto__del_field_order_payment_price__del_field_order_payment_type_desc.pydiff --git a/order/migrations/0007_auto.py b/shop/order/migrations/0007_auto.pysimilarity index 100%rename from order/migrations/0007_auto.pyrename to shop/order/migrations/0007_auto.pydiff --git a/order/migrations/0008_auto.py b/shop/order/migrations/0008_auto.pysimilarity index 100%rename from order/migrations/0008_auto.pyrename to shop/order/migrations/0008_auto.pydiff --git a/order/migrations/0009_auto__add_field_order_anonymous_user_email.py b/shop/order/migrations/0009_auto__add_field_order_anonymous_user_email.pysimilarity index 100%rename from order/migrations/0009_auto__add_field_order_anonymous_user_email.pyrename to shop/order/migrations/0009_auto__add_field_order_anonymous_user_email.pydiff --git a/order/migrations/0009_auto__del_field_order_payment_status.py b/shop/order/migrations/0009_auto__del_field_order_payment_status.pysimilarity index 100%rename from order/migrations/0009_auto__del_field_order_payment_status.pyrename to shop/order/migrations/0009_auto__del_field_order_payment_status.pydiff --git a/order/migrations/0010_auto__add_field_order_anonymous_user_email__add_field_deliverygroup_st.py b/shop/order/migrations/0010_auto__add_field_order_anonymous_user_email__add_field_deliverygroup_st.pysimilarity index 100%rename from order/migrations/0010_auto__add_field_order_anonymous_user_email__add_field_deliverygroup_st.pyrename to shop/order/migrations/0010_auto__add_field_order_anonymous_user_email__add_field_deliverygroup_st.pydiff --git a/product/__init__.py b/shop/order/migrations/__init__.pysimilarity index 100%rename from product/__init__.pyrename to shop/order/migrations/__init__.pydiff --git a/order/models.py b/shop/order/models.pysimilarity index 97%rename from order/models.pyrename to shop/order/models.pyindex 2a5132b6bd..9d9c91de90 100644--- a/order/models.py+++ b/shop/order/models.py@@ -1,20 +1,20 @@import datetimefrom decimal import Decimal-from communication.mail import send_emailfrom django.conf import settingsfrom django.core.urlresolvers import reversefrom django.db import modelsfrom django.utils.translation import pgettext_lazyfrom django_prices.models import PriceFieldfrom prices import Price-from saleor.utils import build_absolute_urifrom satchless.item import ItemSet, ItemLine-from userprofile.models import Addressfrom uuid import uuid4-from product.models import Product-from utils.models import Subtyped+from ..communication.mail import send_email+from ..core.utils import build_absolute_uri+from ..core.utils.models import Subtyped+from ..product.models import Product+from ..userprofile.models import Addressclass Order(models.Model, ItemSet):diff --git a/order/static/js/order_details.js b/shop/order/static/js/order_details.jssimilarity index 100%rename from order/static/js/order_details.jsrename to shop/order/static/js/order_details.jsdiff --git a/order/templates/order/details.html b/shop/order/templates/order/details.htmlsimilarity index 100%rename from order/templates/order/details.htmlrename to shop/order/templates/order/details.htmldiff --git a/order/templates/order/emails/confirm_email.txt b/shop/order/templates/order/emails/confirm_email.txtsimilarity index 100%rename from order/templates/order/emails/confirm_email.txtrename to shop/order/templates/order/emails/confirm_email.txtdiff --git a/order/templates/order/success.html b/shop/order/templates/order/success.htmlsimilarity index 100%rename from order/templates/order/success.htmlrename to shop/order/templates/order/success.htmldiff --git a/order/tests.py b/shop/order/tests.pysimilarity index 100%rename from order/tests.pyrename to shop/order/tests.pydiff --git a/shop/order/urls.py b/shop/order/urls.pynew file mode 100644index 0000000000..2d1a877cd5--- /dev/null+++ b/shop/order/urls.py@@ -0,0 +1,15 @@+from django.conf.urls import patterns, url, include++from . import views+from ..payment.urls import urlpatterns as payment_urls+++TOKEN_PATTERN = ('(?P<token>[0-9a-z]{8}-[0-9a-z]{4}-[0-9a-z]{4}-[0-9a-z]{4}'+ '-[0-9a-z]{12})')++urlpatterns = patterns(+ '',+ url(r'^%s/$' % TOKEN_PATTERN, views.details, name='details'),+ url(r'^%s/success/$' % TOKEN_PATTERN, views.success, name='success'),+ url(r'^%s/' % TOKEN_PATTERN, include(payment_urls, namespace='payment'))+)diff --git a/order/views.py b/shop/order/views.pysimilarity index 95%rename from order/views.pyrename to shop/order/views.pyindex 63c3608b9a..755df3ec64 100644--- a/order/views.py+++ b/shop/order/views.py@@ -1,6 +1,7 @@from django.shortcuts import get_object_or_404, redirectfrom django.template.response import TemplateResponse-from order.models import Order++from .models import Orderdef success(request, token):diff --git a/payment/__init__.py b/shop/payment/__init__.pysimilarity index 100%rename from payment/__init__.pyrename to shop/payment/__init__.pydiff --git a/payment/forms.py b/shop/payment/forms.pysimilarity index 100%rename from payment/forms.pyrename to shop/payment/forms.pydiff --git a/payment/migrations/0001_initial.py b/shop/payment/migrations/0001_initial.pysimilarity index 100%rename from payment/migrations/0001_initial.pyrename to shop/payment/migrations/0001_initial.pydiff --git a/payment/migrations/0002_auto__del_field_payment_cancel_url__del_field_payment_success_url.py b/shop/payment/migrations/0002_auto__del_field_payment_cancel_url__del_field_payment_success_url.pysimilarity index 100%rename from payment/migrations/0002_auto__del_field_payment_cancel_url__del_field_payment_success_url.pyrename to shop/payment/migrations/0002_auto__del_field_payment_cancel_url__del_field_payment_success_url.pydiff --git a/payment/migrations/0003_auto__del_field_payment_city__del_field_payment_first_name__del_field_.py b/shop/payment/migrations/0003_auto__del_field_payment_city__del_field_payment_first_name__del_field_.pysimilarity index 100%rename from payment/migrations/0003_auto__del_field_payment_city__del_field_payment_first_name__del_field_.pyrename to shop/payment/migrations/0003_auto__del_field_payment_city__del_field_payment_first_name__del_field_.pydiff --git a/product/migrations/__init__.py b/shop/payment/migrations/__init__.pysimilarity index 100%rename from product/migrations/__init__.pyrename to shop/payment/migrations/__init__.pydiff --git a/payment/models.py b/shop/payment/models.pysimilarity index 90%rename from payment/models.pyrename to shop/payment/models.pyindex 8a14c7c5a3..2b2da04ae8 100644--- a/payment/models.py+++ b/shop/payment/models.py@@ -1,11 +1,12 @@-from communication.mail import send_emailfrom django.conf import settingsfrom django.core.urlresolvers import reversefrom django.db import models-from order.models import Order-from payments.models import BasePayment-from saleor.utils import build_absolute_urifrom payments import PurchasedItem+from payments.models import BasePayment++from ..communication.mail import send_email+from ..core.utils import build_absolute_uri+from ..order.models import Orderclass Payment(BasePayment):diff --git a/payment/templates/payment/default.html b/shop/payment/templates/payment/default.htmlsimilarity index 100%rename from payment/templates/payment/default.htmlrename to shop/payment/templates/payment/default.htmldiff --git a/payment/templates/payment/details.html b/shop/payment/templates/payment/details.htmlsimilarity index 100%rename from payment/templates/payment/details.htmlrename to shop/payment/templates/payment/details.htmldiff --git a/payment/templates/payment/emails/confirm_email.txt b/shop/payment/templates/payment/emails/confirm_email.txtsimilarity index 100%rename from payment/templates/payment/emails/confirm_email.txtrename to shop/payment/templates/payment/emails/confirm_email.txtdiff --git a/payment/templates/payment/index.html b/shop/payment/templates/payment/index.htmlsimilarity index 100%rename from payment/templates/payment/index.htmlrename to shop/payment/templates/payment/index.htmldiff --git a/payment/templates/payment/paypal-card.html b/shop/payment/templates/payment/paypal-card.htmlsimilarity index 100%rename from payment/templates/payment/paypal-card.htmlrename to shop/payment/templates/payment/paypal-card.htmldiff --git a/shop/payment/urls.py b/shop/payment/urls.pynew file mode 100644index 0000000000..3f7246aff3--- /dev/null+++ b/shop/payment/urls.py@@ -0,0 +1,11 @@+from django.conf.urls import patterns, url++from . import views+++urlpatterns = patterns(+ '',+ url(r'^payment/$', views.index, name='index'),+ url(r'^remove/$', views.delete, name='delete'),+ url(r'^(?P<variant>[a-z-]+)/$', views.details, name='details')+)diff --git a/payment/views.py b/shop/payment/views.pysimilarity index 96%rename from payment/views.pyrename to shop/payment/views.pyindex 3568b89228..18236a213c 100644--- a/payment/views.py+++ b/shop/payment/views.py@@ -1,10 +1,11 @@from django.http.response import Http404, HttpResponseForbiddenfrom django.shortcuts import redirectfrom django.template.response import TemplateResponse-from order import check_order_status-from payment.forms import PaymentMethodsForm, PaymentDeledeFormfrom payments import RedirectNeeded, get_payment_model+from .forms import PaymentMethodsForm, PaymentDeledeForm+from ..order import check_order_status+Payment = get_payment_model()diff --git a/product/templatetags/__init__.py b/shop/product/__init__.pysimilarity index 100%rename from product/templatetags/__init__.pyrename to shop/product/__init__.pydiff --git a/product/admin.py b/shop/product/admin.pysimilarity index 100%rename from product/admin.pyrename to shop/product/admin.pydiff --git a/product/forms.py b/shop/product/forms.pysimilarity index 54%rename from product/forms.pyrename to shop/product/forms.pyindex 40bd41698b..66410c8f0d 100644--- a/product/forms.py+++ b/shop/product/forms.py@@ -1,4 +1,4 @@-from cart.forms import AddToCartForm+from ..cart.forms import AddToCartFormclass ProductForm(AddToCartForm):diff --git a/product/migrations/0001_initial.py b/shop/product/migrations/0001_initial.pysimilarity index 100%rename from product/migrations/0001_initial.pyrename to shop/product/migrations/0001_initial.pydiff --git a/product/migrations/0002_auto__add_field_product_stock.py b/shop/product/migrations/0002_auto__add_field_product_stock.pysimilarity index 100%rename from product/migrations/0002_auto__add_field_product_stock.pyrename to shop/product/migrations/0002_auto__add_field_product_stock.pydiff --git a/product/migrations/0003_auto__del_field_product_subtype_attr.py b/shop/product/migrations/0003_auto__del_field_product_subtype_attr.pysimilarity index 100%rename from product/migrations/0003_auto__del_field_product_subtype_attr.pyrename to shop/product/migrations/0003_auto__del_field_product_subtype_attr.pydiff --git a/product/migrations/0004_auto__add_digitalship__add_ship__del_field_product_stock.py b/shop/product/migrations/0004_auto__add_digitalship__add_ship__del_field_product_stock.pysimilarity index 100%rename from product/migrations/0004_auto__add_digitalship__add_ship__del_field_product_stock.pyrename to shop/product/migrations/0004_auto__add_digitalship__add_ship__del_field_product_stock.pydiff --git a/product/migrations/0005_auto__add_field_product_sku.py b/shop/product/migrations/0005_auto__add_field_product_sku.pysimilarity index 100%rename from product/migrations/0005_auto__add_field_product_sku.pyrename to shop/product/migrations/0005_auto__add_field_product_sku.pydiff --git a/product/migrations/0006_update_sku.py b/shop/product/migrations/0006_update_sku.pysimilarity index 100%rename from product/migrations/0006_update_sku.pyrename to shop/product/migrations/0006_update_sku.pydiff --git a/product/migrations/0007_auto__add_unique_product_sku.py b/shop/product/migrations/0007_auto__add_unique_product_sku.pysimilarity index 100%rename from product/migrations/0007_auto__add_unique_product_sku.pyrename to shop/product/migrations/0007_auto__add_unique_product_sku.pydiff --git a/product/migrations/0008_auto__add_fixedproductdiscount.py b/shop/product/migrations/0008_auto__add_fixedproductdiscount.pysimilarity index 100%rename from product/migrations/0008_auto__add_fixedproductdiscount.pyrename to shop/product/migrations/0008_auto__add_fixedproductdiscount.pydiff --git a/product/migrations/0009_auto__add_productimage.py b/shop/product/migrations/0009_auto__add_productimage.pysimilarity index 100%rename from product/migrations/0009_auto__add_productimage.pyrename to shop/product/migrations/0009_auto__add_productimage.pydiff --git a/registration/__init__.py b/shop/product/migrations/__init__.pysimilarity index 100%rename from registration/__init__.pyrename to shop/product/migrations/__init__.pydiff --git a/product/models.py b/shop/product/models.pysimilarity index 100%rename from product/models.pyrename to shop/product/models.pydiff --git a/product/templates/category/_list.html b/shop/product/templates/category/_list.htmlsimilarity index 100%rename from product/templates/category/_list.htmlrename to shop/product/templates/category/_list.htmldiff --git a/product/templates/category/index.html b/shop/product/templates/category/index.htmlsimilarity index 100%rename from product/templates/category/index.htmlrename to shop/product/templates/category/index.htmldiff --git a/product/templates/product/details.html b/shop/product/templates/product/details.htmlsimilarity index 100%rename from product/templates/product/details.htmlrename to shop/product/templates/product/details.htmldiff --git a/registration/migrations/__init__.py b/shop/product/templatetags/__init__.pysimilarity index 100%rename from registration/migrations/__init__.pyrename to shop/product/templatetags/__init__.pydiff --git a/product/templatetags/category.py b/shop/product/templatetags/category.pysimilarity index 83%rename from product/templatetags/category.pyrename to shop/product/templatetags/category.pyindex 999c0ae2ef..aefec0da77 100644--- a/product/templatetags/category.py+++ b/shop/product/templatetags/category.py@@ -1,5 +1,5 @@from django import template-from product.models import Category+from ..models import Categoryregister = template.Library()diff --git a/product/templatetags/discount.py b/shop/product/templatetags/discount.pysimilarity index 100%rename from product/templatetags/discount.pyrename to shop/product/templatetags/discount.pydiff --git a/shop/product/urls.py b/shop/product/urls.pynew file mode 100644index 0000000000..31b0337735--- /dev/null+++ b/shop/product/urls.py@@ -0,0 +1,12 @@+from django.conf.urls import patterns, url++from . import views+++urlpatterns = patterns(+ '',+ url(r'^(?P<slug>[a-z0-9-]+?)-(?P<product_id>[0-9]+)/$',+ views.product_details, name='details'),+ url(r'^category/(?P<slug>[a-z0-9-]+?)/$', views.category_index,+ name='category')+)diff --git a/product/views.py b/shop/product/views.pysimilarity index 100%rename from product/views.pyrename to shop/product/views.pydiff --git a/saleor/migrations/__init__.py b/shop/registration/__init__.pysimilarity index 100%rename from saleor/migrations/__init__.pyrename to shop/registration/__init__.pydiff --git a/registration/backends.py b/shop/registration/backends.pysimilarity index 96%rename from registration/backends.pyrename to shop/registration/backends.pyindex 279ba9bc29..441dbd3168 100644--- a/registration/backends.py+++ b/shop/registration/backends.py@@ -1,5 +1,6 @@from django.contrib.auth import get_user_model-from registration.models import ExternalUserData++from .models import ExternalUserDataUser = get_user_model()diff --git a/registration/forms.py b/shop/registration/forms.pysimilarity index 97%rename from registration/forms.pyrename to shop/registration/forms.pyindex c4b8747d60..63ae4fc3c3 100644--- a/registration/forms.py+++ b/shop/registration/forms.py@@ -8,15 +8,15 @@ from .models import (EmailChangeRequest,ExternalUserData)from .utils import get_client_class_for_service--from communication.mail import send_email+from ..communication.mail import send_emailUser = get_user_model()class LoginForm(AuthenticationForm):- username = forms.EmailField(label=pgettext_lazy(u"Form field", u"Email"), max_length=75)+ username = forms.EmailField(label=pgettext_lazy(u"Form field", u"Email"),+ max_length=75)def __init__(self, request=None, *args, **kwargs):super(LoginForm, self).__init__(request=request, *args, **kwargs)diff --git a/registration/migrations/0001_initial.py b/shop/registration/migrations/0001_initial.pysimilarity index 100%rename from registration/migrations/0001_initial.pyrename to shop/registration/migrations/0001_initial.pydiff --git a/registration/migrations/0002_auto__add_field_emailconfirmation_valid_until.py b/shop/registration/migrations/0002_auto__add_field_emailconfirmation_valid_until.pysimilarity index 100%rename from registration/migrations/0002_auto__add_field_emailconfirmation_valid_until.pyrename to shop/registration/migrations/0002_auto__add_field_emailconfirmation_valid_until.pydiff --git a/registration/migrations/0003_auto__del_emailconfirmation__add_emailconfirmationrequest__del_field_e.py b/shop/registration/migrations/0003_auto__del_emailconfirmation__add_emailconfirmationrequest__del_field_e.pysimilarity index 100%rename from registration/migrations/0003_auto__del_emailconfirmation__add_emailconfirmationrequest__del_field_e.pyrename to shop/registration/migrations/0003_auto__del_emailconfirmation__add_emailconfirmationrequest__del_field_e.pydiff --git a/registration/migrations/0004_auto__add_emailchangerequest.py b/shop/registration/migrations/0004_auto__add_emailchangerequest.pysimilarity index 100%rename from registration/migrations/0004_auto__add_emailchangerequest.pyrename to shop/registration/migrations/0004_auto__add_emailchangerequest.pydiff --git a/registration/migrations/0005_auto__del_field_emailchangerequest_emailconfirmationrequest_ptr__add_f.py b/shop/registration/migrations/0005_auto__del_field_emailchangerequest_emailconfirmationrequest_ptr__add_f.pysimilarity index 100%rename from registration/migrations/0005_auto__del_field_emailchangerequest_emailconfirmationrequest_ptr__add_f.pyrename to shop/registration/migrations/0005_auto__del_field_emailchangerequest_emailconfirmationrequest_ptr__add_f.pydiff --git a/saleor/templatetags/__init__.py b/shop/registration/migrations/__init__.pysimilarity index 100%rename from saleor/templatetags/__init__.pyrename to shop/registration/migrations/__init__.pydiff --git a/registration/models.py b/shop/registration/models.pysimilarity index 100%rename from registration/models.pyrename to shop/registration/models.pydiff --git a/registration/templates/registration/change_password.html b/shop/registration/templates/registration/change_password.htmlsimilarity index 100%rename from registration/templates/registration/change_password.htmlrename to shop/registration/templates/registration/change_password.htmldiff --git a/registration/templates/registration/emails/change_email.txt b/shop/registration/templates/registration/emails/change_email.txtsimilarity index 100%rename from registration/templates/registration/emails/change_email.txtrename to shop/registration/templates/registration/emails/change_email.txtdiff --git a/registration/templates/registration/emails/confirm_email.txt b/shop/registration/templates/registration/emails/confirm_email.txtsimilarity index 100%rename from registration/templates/registration/emails/confirm_email.txtrename to shop/registration/templates/registration/emails/confirm_email.txtdiff --git a/registration/templates/registration/invalid_token.html b/shop/registration/templates/registration/invalid_token.htmlsimilarity index 100%rename from registration/templates/registration/invalid_token.htmlrename to shop/registration/templates/registration/invalid_token.htmldiff --git a/registration/templates/registration/login.html b/shop/registration/templates/registration/login.htmlsimilarity index 100%rename from registration/templates/registration/login.htmlrename to shop/registration/templates/registration/login.htmldiff --git a/registration/templates/registration/logout.html b/shop/registration/templates/registration/logout.htmlsimilarity index 100%rename from registration/templates/registration/logout.htmlrename to shop/registration/templates/registration/logout.htmldiff --git a/registration/templates/registration/request_email_confirmation.html b/shop/registration/templates/registration/request_email_confirmation.htmlsimilarity index 100%rename from registration/templates/registration/request_email_confirmation.htmlrename to shop/registration/templates/registration/request_email_confirmation.htmldiff --git a/registration/templates/registration/set_password.html b/shop/registration/templates/registration/set_password.htmlsimilarity index 100%rename from registration/templates/registration/set_password.htmlrename to shop/registration/templates/registration/set_password.htmldiff --git a/registration/tests.py b/shop/registration/tests.pysimilarity index 93%rename from registration/tests.pyrename to shop/registration/tests.pyindex 2a6e24cb84..642b9b63ed 100644--- a/registration/tests.py+++ b/shop/registration/tests.py@@ -94,9 +94,9 @@ class TestClient(OAuth2Client):class BaseCommunicationTestCase(TestCase):def setUp(self):- self.parse_mock = patch('registration.utils.parse_response').start()-- self.requests_mock = patch('registration.utils.requests').start()+ self.parse_mock = patch(+ 'shop.registration.utils.parse_response').start()+ self.requests_mock = patch('shop.registration.utils.requests').start()self.requests_mock.codes.ok = sentinel.okdef tearDown(self):@@ -194,9 +194,9 @@ class AuthorizerTestCase(TestCase):class CallbackTestCase(TestCase):def setUp(self):- patcher = patch('registration.forms.get_client_class_for_service')+ patcher = patch('shop.registration.forms.get_client_class_for_service')self.getter_mock = patcher.start()- patcher = patch('registration.forms.authenticate')+ patcher = patch('shop.registration.forms.authenticate')self.authenticate_mock = patcher.start()self.client_class = self.getter_mock()@@ -209,8 +209,8 @@ class CallbackTestCase(TestCase):data={'code': 'test_code'})self.assertTrue(self.form.is_valid(), self.form.errors)- @patch('registration.forms.ExternalUserData')- @patch('registration.forms.User')+ @patch('shop.registration.forms.ExternalUserData')+ @patch('shop.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@@ -221,7 +221,7 @@ class CallbackTestCase(TestCase):self.assertEquals(self.authenticate_mock.mock_calls,[call(service=sentinel.service,username=sentinel.id),- call(user=sentinel.user)])+ call(user=sentinel.user)])external_data_mock.objects.create.assert_called_once_with(service=sentinel.service, username=sentinel.id, user=sentinel.user)self.assertEquals(user, sentinel.authed_user)@@ -242,7 +242,7 @@ class CallbackTestCase(TestCase):class EmailConfirmationTestCase(TestCase):- @patch('registration.forms.authenticate')+ @patch('shop.registration.forms.authenticate')def test_password_set(self, authenticate_mock):"""Email confirmation sets new password and logs the user"""user = Mock()@@ -258,7 +258,7 @@ class EmailConfirmationTestCase(TestCase):user.set_password.assert_called_once_with('pass')authenticate_mock.assert_called_once_with(user=user)- @patch('registration.forms.authenticate')+ @patch('shop.registration.forms.authenticate')def test_password_unset(self, authenticate_mock):"""Email confirmation unsets a password and logs the user"""user = Mock()@@ -277,8 +277,8 @@ class EmailConfirmationTestCase(TestCase):class EmailChangeTestCase(TestCase):- @patch('registration.views.now')- @patch('registration.views.EmailChangeRequest.objects.get')+ @patch('shop.registration.views.now')+ @patch('shop.registration.views.EmailChangeRequest.objects.get')def test_another_user_logged_out(self, get, now):# user requests email change@@ -301,8 +301,8 @@ class EmailChangeTestCase(TestCase):self.assertFalse(request.user.is_authenticated())token_object.delete.assert_not_called()- @patch('registration.views.now')- @patch('registration.views.EmailChangeRequest.objects.get')+ @patch('shop.registration.views.now')+ @patch('shop.registration.views.EmailChangeRequest.objects.get')def test_user_logged_in(self, get, now):# user requests email changediff --git a/shop/registration/urls.py b/shop/registration/urls.pynew file mode 100644index 0000000000..930412a7f8--- /dev/null+++ b/shop/registration/urls.py@@ -0,0 +1,21 @@+from django.conf.urls import patterns, url++from . import views+++urlpatterns = patterns(+ '',+ url(r'^login/$', views.login, name='login'),+ url(r'^logout/$', views.logout, name='logout'),+ url(r'^oauth_callback/(?P<service>\w+)/$', views.oauth_callback,+ name='oauth_callback'),+ url(r'^change_password/$', views.change_password,+ name='change_password'),+ url(r'^request_email_confirmation/$', views.request_email_confirmation,+ name='request_email_confirmation'),+ url(r'^confirm_email/(?P<token>\w+)/$', views.confirm_email,+ name='confirm_email'),+ url(r'^request_email_change/$', views.request_email_change,+ name='request_email_change'),+ url(r'^change_email/(?P<token>\w+)/$', views.change_email,+ name='change_email'))diff --git a/registration/utils.py b/shop/registration/utils.pysimilarity index 98%rename from registration/utils.pyrename to shop/registration/utils.pyindex a28bcd64f3..467efe6786 100644--- a/registration/utils.py+++ b/shop/registration/utils.py@@ -72,7 +72,8 @@ class OAuth2Client(object):self.local_host = local_hostif code:access_token = self.get_access_token(code)- self.authorizer = OAuth2RequestAuthorizer(access_token=access_token)+ self.authorizer = OAuth2RequestAuthorizer(+ access_token=access_token)else:self.authorizer = Nonediff --git a/registration/views.py b/shop/registration/views.pysimilarity index 100%rename from registration/views.pyrename to shop/registration/views.pydiff --git a/saleor/settings.py b/shop/settings.pysimilarity index 80%rename from saleor/settings.pyrename to shop/settings.pyindex 03e80a6562..05fbcbb0be 100644--- a/saleor/settings.py+++ b/shop/settings.py@@ -7,9 +7,9 @@ SITE_ID = 1PROJECT_ROOT = os.path.normpath(os.path.join(os.path.dirname(__file__), '..'))-ROOT_URLCONF = 'saleor.urls'+ROOT_URLCONF = 'shop.urls'-WSGI_APPLICATION = 'saleor.wsgi.application'+WSGI_APPLICATION = 'shop.wsgi.application'ADMINS = (# ('Your Name', '[email protected]'),@@ -20,7 +20,7 @@ INTERNAL_IPS = ['127.0.0.1']DATABASES = {'default': {'ENGINE': 'django.db.backends.sqlite3',- 'NAME': 'dev.sqlite',+ 'NAME': 'dev.sqlite'}}@@ -36,21 +36,21 @@ MEDIA_URL = '/media/'STATIC_ROOT = os.path.join(PROJECT_ROOT, 'static')STATIC_URL = '/static/'STATICFILES_DIRS = [- os.path.join(PROJECT_ROOT, 'saleor', 'static'),+ os.path.join(PROJECT_ROOT, 'shop', 'static')]STATICFILES_FINDERS = ['django.contrib.staticfiles.finders.FileSystemFinder',- 'django.contrib.staticfiles.finders.AppDirectoriesFinder',- # 'django.contrib.staticfiles.finders.DefaultStorageFinder',+ 'django.contrib.staticfiles.finders.AppDirectoriesFinder']TEMPLATE_DIRS = [- os.path.join(PROJECT_ROOT, 'saleor', 'templates'),+ os.path.join(PROJECT_ROOT, 'templates')]TEMPLATE_LOADERS = [+ 'django.template.loaders.filesystem.Loader','django.template.loaders.app_directories.Loader',# TODO: this one is slow, but for now need for mptt?- 'django.template.loaders.eggs.Loader',+ 'django.template.loaders.eggs.Loader']# Make this unique, and don't share it with anybody.@@ -62,8 +62,8 @@ MIDDLEWARE_CLASSES = ['django.middleware.csrf.CsrfViewMiddleware','django.contrib.auth.middleware.AuthenticationMiddleware','django.contrib.messages.middleware.MessageMiddleware',- 'cart.middleware.CartMiddleware',- 'saleor.middleware.CheckHTML',+ 'shop.cart.middleware.CartMiddleware',+ 'shop.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',- 'saleor.context_processors.googe_analytics',- 'saleor.context_processors.canonical_hostname',- 'saleor.context_processors.default_currency',+ 'shop.core.context_processors.googe_analytics',+ 'shop.core.context_processors.canonical_hostname',+ 'shop.core.context_processors.default_currency']INSTALLED_APPS = [@@ -99,14 +99,14 @@ INSTALLED_APPS = ['south',# Local apps- 'cart',- 'checkout',- 'order',- 'payment',- 'product',- 'registration',- 'saleor',- 'userprofile',+ 'shop.cart',+ 'shop.checkout',+ 'shop.core',+ 'shop.order',+ 'shop.payment',+ 'shop.product',+ 'shop.registration',+ 'shop.userprofile']LOGGING = {@@ -146,20 +146,20 @@ LOGGING = {'django.request': {'handlers': ['mail_admins'],'level': 'ERROR',- 'propagate': True,+ 'propagate': True},- 'saleor': {+ 'shop': {'handlers': ['console'],'level': 'DEBUG',- 'propagate': True,- },+ 'propagate': True+ }}}AUTHENTICATION_BACKENDS = (- 'registration.backends.EmailPasswordBackend',- 'registration.backends.ExternalLoginBackend',- 'registration.backends.TrivialBackend',+ 'shop.registration.backends.EmailPasswordBackend',+ 'shop.registration.backends.ExternalLoginBackend',+ 'shop.registration.backends.TrivialBackend')AUTH_USER_MODEL = 'userprofile.User'@@ -201,7 +201,7 @@ PAYMENT_BASE_URL = 'http://%s/' % CANONICAL_HOSTNAMEPAYMENT_MODEL = "payment.Payment"PAYMENT_VARIANTS = {- 'default': ('payments.dummy.DummyProvider', {'url': 'http://google.pl/'}),+ 'default': ('payments.dummy.DummyProvider', {'url': 'http://google.pl/'})}CHECKOUT_PAYMENT_CHOICES = [diff --git a/saleor/static/css/bootstrap-theme.css b/shop/static/css/bootstrap-theme.csssimilarity index 100%rename from saleor/static/css/bootstrap-theme.cssrename to shop/static/css/bootstrap-theme.cssdiff --git a/saleor/static/css/bootstrap-theme.min.css b/shop/static/css/bootstrap-theme.min.csssimilarity index 100%rename from saleor/static/css/bootstrap-theme.min.cssrename to shop/static/css/bootstrap-theme.min.cssdiff --git a/saleor/static/css/bootstrap.css b/shop/static/css/bootstrap.csssimilarity index 100%rename from saleor/static/css/bootstrap.cssrename to shop/static/css/bootstrap.cssdiff --git a/saleor/static/css/bootstrap.min.css b/shop/static/css/bootstrap.min.csssimilarity index 100%rename from saleor/static/css/bootstrap.min.cssrename to shop/static/css/bootstrap.min.cssdiff --git a/saleor/static/fonts/glyphicons-halflings-regular.eot b/shop/static/fonts/glyphicons-halflings-regular.eotsimilarity index 100%rename from saleor/static/fonts/glyphicons-halflings-regular.eotrename to shop/static/fonts/glyphicons-halflings-regular.eotdiff --git a/saleor/static/fonts/glyphicons-halflings-regular.svg b/shop/static/fonts/glyphicons-halflings-regular.svgsimilarity index 100%rename from saleor/static/fonts/glyphicons-halflings-regular.svgrename to shop/static/fonts/glyphicons-halflings-regular.svgdiff --git a/saleor/static/fonts/glyphicons-halflings-regular.ttf b/shop/static/fonts/glyphicons-halflings-regular.ttfsimilarity index 100%rename from saleor/static/fonts/glyphicons-halflings-regular.ttfrename to shop/static/fonts/glyphicons-halflings-regular.ttfdiff --git a/saleor/static/fonts/glyphicons-halflings-regular.woff b/shop/static/fonts/glyphicons-halflings-regular.woffsimilarity index 100%rename from saleor/static/fonts/glyphicons-halflings-regular.woffrename to shop/static/fonts/glyphicons-halflings-regular.woffdiff --git a/saleor/static/img/glyphicons-halflings-white.png b/shop/static/img/glyphicons-halflings-white.pngsimilarity index 100%rename from saleor/static/img/glyphicons-halflings-white.pngrename to shop/static/img/glyphicons-halflings-white.pngdiff --git a/saleor/static/img/glyphicons-halflings.png b/shop/static/img/glyphicons-halflings.pngsimilarity index 100%rename from saleor/static/img/glyphicons-halflings.pngrename to shop/static/img/glyphicons-halflings.pngdiff --git a/saleor/static/js/lib/bootstrap.js b/shop/static/js/lib/bootstrap.jssimilarity index 100%rename from saleor/static/js/lib/bootstrap.jsrename to shop/static/js/lib/bootstrap.jsdiff --git a/saleor/static/js/lib/bootstrap.min.js b/shop/static/js/lib/bootstrap.min.jssimilarity index 100%rename from saleor/static/js/lib/bootstrap.min.jsrename to shop/static/js/lib/bootstrap.min.jsdiff --git a/saleor/static/js/lib/less.js b/shop/static/js/lib/less.jssimilarity index 100%rename from saleor/static/js/lib/less.jsrename to shop/static/js/lib/less.jsdiff --git a/saleor/static/less/style.less b/shop/static/less/style.lesssimilarity index 100%rename from saleor/static/less/style.lessrename to shop/static/less/style.lessdiff --git a/saleor/test_settings.py b/shop/test_settings.pysimilarity index 100%rename from saleor/test_settings.pyrename to shop/test_settings.pydiff --git a/shop/urls.py b/shop/urls.pynew file mode 100644index 0000000000..9f55860d4b--- /dev/null+++ b/shop/urls.py@@ -0,0 +1,36 @@+from django.conf import settings+from django.conf.urls import patterns, url, include+from django.contrib import admin+++from .cart.urls import urlpatterns as cart_urls+from .checkout.urls import urlpatterns as checkout_urls+from .core.urls import urlpatterns as core_urls+from .order.urls import urlpatterns as order_urls+from .product.urls import urlpatterns as product_urls+from .registration.urls import urlpatterns as registration_urls+from .userprofile.urls import urlpatterns as userprofile_urls+++admin.autodiscover()++urlpatterns = patterns(+ '',+ url(r'^$', include(core_urls), name='home'),+ url(r'^account/', include(registration_urls, namespace='registration')),+ url(r'^admin/', include(admin.site.urls)),+ url(r'^cart/', include(cart_urls, namespace='cart')),+ url(r'^checkout/', include(checkout_urls, namespace='checkout')),+ url(r'^images/', include('django_images.urls')),+ url(r'^order/', include(order_urls, namespace='order')),+ url(r'^products/', include(product_urls, namespace='product')),+ url(r'^profile/', include(userprofile_urls, namespace='profile')),+ url(r'', include('payments.urls'))+)++if settings.DEBUG:+ # static files (images, css, javascript, etc.)+ urlpatterns += patterns(+ '',+ url(r'^media/(?P<path>.*)$', 'django.views.static.serve',+ {'document_root': settings.MEDIA_ROOT}))diff --git a/userprofile/__init__.py b/shop/userprofile/__init__.pysimilarity index 100%rename from userprofile/__init__.pyrename to shop/userprofile/__init__.pydiff --git a/userprofile/admin.py b/shop/userprofile/admin.pysimilarity index 100%rename from userprofile/admin.pyrename to shop/userprofile/admin.pydiff --git a/userprofile/forms.py b/shop/userprofile/forms.pysimilarity index 100%rename from userprofile/forms.pyrename to shop/userprofile/forms.pydiff --git a/userprofile/management/__init__.py b/shop/userprofile/management/__init__.pysimilarity index 100%rename from userprofile/management/__init__.pyrename to shop/userprofile/management/__init__.pydiff --git a/userprofile/management/commands/__init__.py b/shop/userprofile/management/commands/__init__.pysimilarity index 100%rename from userprofile/management/commands/__init__.pyrename to shop/userprofile/management/commands/__init__.pydiff --git a/userprofile/management/commands/changepassword.py b/shop/userprofile/management/commands/changepassword.pysimilarity index 100%rename from userprofile/management/commands/changepassword.pyrename to shop/userprofile/management/commands/changepassword.pydiff --git a/userprofile/management/commands/createsuperuser.py b/shop/userprofile/management/commands/createsuperuser.pysimilarity index 100%rename from userprofile/management/commands/createsuperuser.pyrename to shop/userprofile/management/commands/createsuperuser.pydiff --git a/userprofile/migrations/0001_initial.py b/shop/userprofile/migrations/0001_initial.pysimilarity index 100%rename from userprofile/migrations/0001_initial.pyrename to shop/userprofile/migrations/0001_initial.pydiff --git a/userprofile/migrations/0002_auto__add_address__add_field_user_default_shipping_address__add_field_.py b/shop/userprofile/migrations/0002_auto__add_address__add_field_user_default_shipping_address__add_field_.pysimilarity index 100%rename from userprofile/migrations/0002_auto__add_address__add_field_user_default_shipping_address__add_field_.pyrename to shop/userprofile/migrations/0002_auto__add_address__add_field_user_default_shipping_address__add_field_.pydiff --git a/userprofile/migrations/0003_auto__add_unique_address_alias_user.py b/shop/userprofile/migrations/0003_auto__add_unique_address_alias_user.pysimilarity index 100%rename from userprofile/migrations/0003_auto__add_unique_address_alias_user.pyrename to shop/userprofile/migrations/0003_auto__add_unique_address_alias_user.pydiff --git a/userprofile/migrations/0004_auto__add_addressbook__add_unique_addressbook_user_alias__del_field_ad.py b/shop/userprofile/migrations/0004_auto__add_addressbook__add_unique_addressbook_user_alias__del_field_ad.pysimilarity index 100%rename from userprofile/migrations/0004_auto__add_addressbook__add_unique_addressbook_user_alias__del_field_ad.pyrename to shop/userprofile/migrations/0004_auto__add_addressbook__add_unique_addressbook_user_alias__del_field_ad.pydiff --git a/userprofile/migrations/0005_auto__chg_field_user_default_billing_address__chg_field_user_default_s.py b/shop/userprofile/migrations/0005_auto__chg_field_user_default_billing_address__chg_field_user_default_s.pysimilarity index 100%rename from userprofile/migrations/0005_auto__chg_field_user_default_billing_address__chg_field_user_default_s.pyrename to shop/userprofile/migrations/0005_auto__chg_field_user_default_billing_address__chg_field_user_default_s.pydiff --git a/userprofile/migrations/__init__.py b/shop/userprofile/migrations/__init__.pysimilarity index 100%rename from userprofile/migrations/__init__.pyrename to shop/userprofile/migrations/__init__.pydiff --git a/userprofile/models.py b/shop/userprofile/models.pysimilarity index 99%rename from userprofile/models.pyrename to shop/userprofile/models.pyindex 7a318d083c..70b5e1221d 100644--- a/userprofile/models.py+++ b/shop/userprofile/models.py@@ -9,7 +9,7 @@ from django.utils.safestring import mark_safefrom django.utils.translation import ugettext_lazy, pgettext_lazyfrom unidecode import unidecode-from saleor.countries import COUNTRY_CHOICES+from ..core.countries import COUNTRY_CHOICESclass AddressBook(models.Model):diff --git a/userprofile/templates/userprofile/address-delete.html b/shop/userprofile/templates/userprofile/address-delete.htmlsimilarity index 100%rename from userprofile/templates/userprofile/address-delete.htmlrename to shop/userprofile/templates/userprofile/address-delete.htmldiff --git a/userprofile/templates/userprofile/address-edit.html b/shop/userprofile/templates/userprofile/address-edit.htmlsimilarity index 100%rename from userprofile/templates/userprofile/address-edit.htmlrename to shop/userprofile/templates/userprofile/address-edit.htmldiff --git a/userprofile/templates/userprofile/details.html b/shop/userprofile/templates/userprofile/details.htmlsimilarity index 100%rename from userprofile/templates/userprofile/details.htmlrename to shop/userprofile/templates/userprofile/details.htmldiff --git a/userprofile/templates/userprofile/orders.html b/shop/userprofile/templates/userprofile/orders.htmlsimilarity index 100%rename from userprofile/templates/userprofile/orders.htmlrename to shop/userprofile/templates/userprofile/orders.htmldiff --git a/userprofile/tests.py b/shop/userprofile/tests.pysimilarity index 100%rename from userprofile/tests.pyrename to shop/userprofile/tests.pydiff --git a/shop/userprofile/urls.py b/shop/userprofile/urls.pynew file mode 100644index 0000000000..860f1261eb--- /dev/null+++ b/shop/userprofile/urls.py@@ -0,0 +1,19 @@+from django.conf.urls import patterns, url++from . import views+++urlpatterns = patterns(+ '',+ url(r'^$', views.details, name='details'),+ url(r'^orders/$', views.orders, name='orders'),+ url(r'^address/create/$', views.address_create,+ name='address-create'),+ url(r'^address/(?P<slug>[\w-]+)-(?P<pk>\d+)/edit/$', views.address_edit,+ name='address-edit'),+ url(r'^address/(?P<slug>[\w-]+)-(?P<pk>\d+)/delete/$',+ views.address_delete, name='address-delete'),+ url(r'^address/(?P<pk>\d+)/make-default-for-'+ r'(?P<purpose>billing|shipping)/$', views.address_make_default,+ name='address-make-default')+)diff --git a/userprofile/views.py b/shop/userprofile/views.pysimilarity index 100%rename from userprofile/views.pyrename to shop/userprofile/views.pydiff --git a/saleor/wsgi.py b/shop/wsgi.pysimilarity index 100%rename from saleor/wsgi.pyrename to shop/wsgi.pydiff --git a/saleor/templates/base.html b/templates/base.htmlsimilarity index 100%rename from saleor/templates/base.htmlrename to templates/base.htmldiff --git a/userprofile/urls.py b/userprofile/urls.pydeleted file mode 100644index d3f2e81e73..0000000000--- a/userprofile/urls.py+++ /dev/null@@ -1,20 +0,0 @@-from django.conf.urls import patterns, url---urlpatterns = patterns(- '',- url(r'^$', 'userprofile.views.details', name='details'),- url(r'^orders/$', 'userprofile.views.orders', name='orders'),- url(r'^address/create/$',- 'userprofile.views.address_create',- name='address-create'),- url(r'^address/(?P<slug>[\w-]+)-(?P<pk>\d+)/edit/$',- 'userprofile.views.address_edit',- name='address-edit'),- url(r'^address/(?P<slug>[\w-]+)-(?P<pk>\d+)/delete/$',- 'userprofile.views.address_delete',- name='address-delete'),- url(r'^address/(?P<pk>\d+)/make-default-for-'- '(?P<purpose>billing|shipping)/$',- 'userprofile.views.address_make_default',- name='address-make-default'))