Bläddra i källkod

Merge branch 'master' into search

Had to add "apps" to many of the import paths within the search module

Conflicts:
	examples/vanilla/settings.py
	oscar/apps/promotions/views.py
	oscar/tests.py
	oscar/urls.py
	requirements-dev.txt
master
David Winterbottom 14 år sedan
förälder
incheckning
130770f647
100 ändrade filer med 119 tillägg och 103 borttagningar
  1. 0
    3
      docs/source/contributing.rst
  2. 10
    3
      docs/source/index.rst
  3. 2
    2
      examples/vanilla/import.py
  4. 19
    19
      examples/vanilla/settings.py
  5. 0
    0
      oscar/apps/__init__.py
  6. 0
    0
      oscar/apps/address/__init__.py
  7. 0
    0
      oscar/apps/address/abstract_models.py
  8. 1
    1
      oscar/apps/address/admin.py
  9. 0
    0
      oscar/apps/address/fixtures/initial_data.json
  10. 1
    1
      oscar/apps/address/forms.py
  11. 1
    1
      oscar/apps/address/models.py
  12. 3
    3
      oscar/apps/address/tests.py
  13. 0
    0
      oscar/apps/analytics/__init__.py
  14. 0
    0
      oscar/apps/analytics/abstract_models.py
  15. 1
    1
      oscar/apps/analytics/admin.py
  16. 2
    2
      oscar/apps/analytics/models.py
  17. 1
    1
      oscar/apps/analytics/reports.py
  18. 0
    0
      oscar/apps/basket/__init__.py
  19. 1
    1
      oscar/apps/basket/abstract_models.py
  20. 1
    1
      oscar/apps/basket/admin.py
  21. 1
    1
      oscar/apps/basket/factory.py
  22. 0
    0
      oscar/apps/basket/forms.py
  23. 0
    0
      oscar/apps/basket/managers.py
  24. 1
    1
      oscar/apps/basket/models.py
  25. 1
    1
      oscar/apps/basket/reports.py
  26. 0
    0
      oscar/apps/basket/signals.py
  27. 2
    2
      oscar/apps/basket/tests.py
  28. 1
    1
      oscar/apps/basket/urls.py
  29. 2
    2
      oscar/apps/basket/views.py
  30. 0
    0
      oscar/apps/checkout/__init__.py
  31. 0
    0
      oscar/apps/checkout/calculators.py
  32. 1
    1
      oscar/apps/checkout/core_views.py
  33. 0
    0
      oscar/apps/checkout/decorators.py
  34. 1
    1
      oscar/apps/checkout/forms.py
  35. 0
    0
      oscar/apps/checkout/signals.py
  36. 1
    1
      oscar/apps/checkout/tests.py
  37. 2
    2
      oscar/apps/checkout/urls.py
  38. 1
    1
      oscar/apps/checkout/utils.py
  39. 2
    2
      oscar/apps/checkout/views.py
  40. 0
    0
      oscar/apps/customer/__init__.py
  41. 1
    1
      oscar/apps/customer/history_helpers.py
  42. 0
    0
      oscar/apps/customer/templatetags/__init__.py
  43. 1
    1
      oscar/apps/customer/templatetags/history_tags.py
  44. 2
    2
      oscar/apps/customer/tests.py
  45. 3
    3
      oscar/apps/customer/urls.py
  46. 3
    3
      oscar/apps/customer/views.py
  47. 0
    0
      oscar/apps/datacash/__init__.py
  48. 0
    0
      oscar/apps/datacash/abstract_models.py
  49. 1
    1
      oscar/apps/datacash/models.py
  50. 0
    0
      oscar/apps/datacash/utils.py
  51. 0
    0
      oscar/apps/discount/__init__.py
  52. 0
    0
      oscar/apps/discount/abstract_models.py
  53. 1
    1
      oscar/apps/discount/admin.py
  54. 1
    1
      oscar/apps/discount/models.py
  55. 2
    2
      oscar/apps/discount/tests.py
  56. 0
    0
      oscar/apps/image/__init__.py
  57. 0
    0
      oscar/apps/image/abstract_models.py
  58. 2
    1
      oscar/apps/image/admin.py
  59. 5
    0
      oscar/apps/image/models.py
  60. 0
    0
      oscar/apps/image/tests.py
  61. 0
    0
      oscar/apps/image/views.py
  62. 0
    0
      oscar/apps/offer/__init__.py
  63. 1
    1
      oscar/apps/offer/abstract_models.py
  64. 1
    1
      oscar/apps/offer/admin.py
  65. 0
    0
      oscar/apps/offer/fixtures/sample-voucher.json
  66. 0
    0
      oscar/apps/offer/managers.py
  67. 2
    2
      oscar/apps/offer/models.py
  68. 1
    1
      oscar/apps/offer/receivers.py
  69. 1
    1
      oscar/apps/offer/reports.py
  70. 5
    5
      oscar/apps/offer/tests.py
  71. 1
    1
      oscar/apps/offer/utils.py
  72. 0
    0
      oscar/apps/offer/views.py
  73. 0
    0
      oscar/apps/order/__init__.py
  74. 0
    0
      oscar/apps/order/abstract_models.py
  75. 1
    1
      oscar/apps/order/admin.py
  76. 0
    0
      oscar/apps/order/fixtures/initial_data.json
  77. 0
    0
      oscar/apps/order/fixtures/sample-order.json
  78. 2
    2
      oscar/apps/order/models.py
  79. 1
    1
      oscar/apps/order/reports.py
  80. 0
    0
      oscar/apps/order/signals.py
  81. 3
    3
      oscar/apps/order/tests.py
  82. 1
    1
      oscar/apps/order/utils.py
  83. 0
    0
      oscar/apps/order_management/__init__.py
  84. 2
    2
      oscar/apps/order_management/urls.py
  85. 2
    2
      oscar/apps/order_management/views.py
  86. 0
    0
      oscar/apps/payment/__init__.py
  87. 0
    0
      oscar/apps/payment/abstract_models.py
  88. 1
    1
      oscar/apps/payment/admin.py
  89. 1
    1
      oscar/apps/payment/forms.py
  90. 1
    1
      oscar/apps/payment/models.py
  91. 2
    2
      oscar/apps/payment/tests.py
  92. 0
    0
      oscar/apps/payment/views.py
  93. 0
    0
      oscar/apps/product/__init__.py
  94. 1
    1
      oscar/apps/product/abstract_models.py
  95. 1
    1
      oscar/apps/product/admin.py
  96. 0
    0
      oscar/apps/product/fixtures/initial_data.json
  97. 0
    0
      oscar/apps/product/fixtures/sample-products.json
  98. 0
    0
      oscar/apps/product/managers.py
  99. 7
    1
      oscar/apps/product/models.py
  100. 0
    0
      oscar/apps/product/signals.py

+ 0
- 3
docs/source/contributing.rst Visa fil

@@ -3,9 +3,6 @@ Contributing
3 3
 
4 4
 Make sure you've read http://python.net/~goodger/projects/pycon/2007/idiomatic/handout.html
5 5
 
6
-Guidelines
7
-----------
8
-
9 6
 * New features should be discussed on the mailing list (or in the meetings) before serious work starts
10 7
 * Pull requests will be rejected if sufficient tests aren't provided
11 8
 * Please updated the documentation when altering behaviour or introducing new features 

+ 10
- 3
docs/source/index.rst Visa fil

@@ -3,8 +3,9 @@
3 3
    You can adapt this file completely to your liking, but it should at least
4 4
    contain the root `toctree` directive.
5 5
 
6
-django-oscar - Domain-driven e-commerce for Django
7
-==================================================
6
+=============================================
7
+Welcome to the documentation for django-oscar
8
+=============================================
8 9
 
9 10
 django-oscar is a flexible e-commerce platform for Django, designed to build domain-driven
10 11
 ecommerce sites.  It differs from other e-commerce projects in that the core of django-oscar is kept
@@ -19,11 +20,17 @@ their existing Taoshop PHP platform which currently powers several large-scale e
19 20
 It is still in early development, but a stable release is planned for early summer 2011.
20 21
 The source is on Github: https://github.com/tangentlabs/django-oscar
21 22
 
23
+Getting started:
22 24
 
25
+.. toctree::
26
+    :maxdepth: 2
27
+    :numbered:
23 28
 
29
+    contributing
30
+    getting_started
24 31
 
25 32
 
26
-Contents:
33
+Full contents:
27 34
 
28 35
 .. toctree::
29 36
    :maxdepth: 2

+ 2
- 2
examples/vanilla/import.py Visa fil

@@ -5,8 +5,8 @@ from django.core.management import setup_environ
5 5
 import settings as app_settings
6 6
 setup_environ(app_settings)
7 7
 
8
-from oscar.product.models import ItemClass, Item, AttributeType, ItemAttributeValue, Option
9
-from oscar.stock.models import Partner, StockRecord
8
+from oscar.apps.product.models import ItemClass, Item, AttributeType, ItemAttributeValue, Option
9
+from oscar.apps.stock.models import Partner, StockRecord
10 10
 from django.db import connection as django_connection
11 11
 
12 12
 connection = MySQLdb.connect(host='localhost', user='root', passwd='gsiwmm', db='CWDM_app_production_copy')

+ 19
- 19
examples/vanilla/settings.py Visa fil

@@ -81,8 +81,8 @@ TEMPLATE_CONTEXT_PROCESSORS = (
81 81
     "django.core.context_processors.static",
82 82
     "django.contrib.messages.context_processors.messages",
83 83
     # Oscar specific
84
-    'oscar.promotions.context_processors.promotions',
85
-    'oscar.search.context_processors.search_form',
84
+    'oscar.apps.search.context_processors.search_form',
85
+    'oscar.apps.promotions.context_processors.promotions',
86 86
 ) 
87 87
 
88 88
 MIDDLEWARE_CLASSES = (
@@ -182,23 +182,23 @@ INSTALLED_APPS = (
182 182
     #'debug_toolbar',
183 183
     # Apps from oscar
184 184
     'oscar',
185
-    'oscar.analytics',
186
-    'oscar.discount',
187
-    'oscar.order',
188
-    'oscar.checkout',
189
-    'oscar.shipping',
190
-    'oscar.order_management',
191
-    'oscar.product',
192
-    'oscar.basket',
193
-    'oscar.payment',
194
-    'oscar.offer',
195
-    'oscar.address',
196
-    'oscar.stock',
197
-    'oscar.image',
198
-    'oscar.customer',
199
-    'oscar.promotions',
200
-    'oscar.reports',
201
-    'oscar.search',
185
+    'oscar.apps.analytics',
186
+    'oscar.apps.discount',
187
+    'oscar.apps.order',
188
+    'oscar.apps.checkout',
189
+    'oscar.apps.shipping',
190
+    'oscar.apps.order_management',
191
+    'oscar.apps.product',
192
+    'oscar.apps.basket',
193
+    'oscar.apps.payment',
194
+    'oscar.apps.offer',
195
+    'oscar.apps.address',
196
+    'oscar.apps.stock',
197
+    'oscar.apps.image',
198
+    'oscar.apps.customer',
199
+    'oscar.apps.promotions',
200
+    'oscar.apps.reports',
201
+    'oscar.apps.search',
202 202
 )
203 203
 
204 204
 LOGIN_REDIRECT_URL = '/shop/accounts/profile/'

oscar/address/__init__.py → oscar/apps/__init__.py Visa fil


oscar/analytics/__init__.py → oscar/apps/address/__init__.py Visa fil


oscar/address/abstract_models.py → oscar/apps/address/abstract_models.py Visa fil


oscar/address/admin.py → oscar/apps/address/admin.py Visa fil

@@ -1,6 +1,6 @@
1 1
 from django.contrib import admin
2 2
 
3
-from oscar.services import import_module
3
+from oscar.core.loading import import_module
4 4
 models = import_module('address.models', ['UserAddress', 'Country'])
5 5
 
6 6
 admin.site.register(models.UserAddress)

oscar/address/fixtures/initial_data.json → oscar/apps/address/fixtures/initial_data.json Visa fil


oscar/address/forms.py → oscar/apps/address/forms.py Visa fil

@@ -1,7 +1,7 @@
1 1
 # -*- coding: utf-8 -*-
2 2
 from django.forms import ModelForm
3 3
 
4
-from oscar.services import import_module
4
+from oscar.core.loading import import_module
5 5
 address_models = import_module('address.models', ['UserAddress'])
6 6
 
7 7
 

oscar/address/models.py → oscar/apps/address/models.py Visa fil

@@ -1,6 +1,6 @@
1 1
 from django.db import models
2 2
 
3
-from oscar.address.abstract_models import AbstractUserAddress, AbstractCountry
3
+from oscar.apps.address.abstract_models import AbstractUserAddress, AbstractCountry
4 4
 
5 5
 
6 6
 class UserAddress(AbstractUserAddress):

oscar/address/tests.py → oscar/apps/address/tests.py Visa fil

@@ -1,9 +1,9 @@
1 1
 from django.contrib.auth.models import User
2 2
 from django.test import TestCase
3 3
 
4
-from oscar.address.models import Country, UserAddress
5
-from oscar.basket.models import Basket
6
-from oscar.order.models import ShippingAddress
4
+from oscar.apps.address.models import Country, UserAddress
5
+from oscar.apps.basket.models import Basket
6
+from oscar.apps.order.models import ShippingAddress
7 7
 
8 8
 
9 9
 class UserAddressTest(TestCase):

oscar/basket/__init__.py → oscar/apps/analytics/__init__.py Visa fil


oscar/analytics/abstract_models.py → oscar/apps/analytics/abstract_models.py Visa fil


oscar/analytics/admin.py → oscar/apps/analytics/admin.py Visa fil

@@ -1,6 +1,6 @@
1 1
 from django.contrib import admin
2 2
 
3
-from oscar.services import import_module
3
+from oscar.core.loading import import_module
4 4
 models = import_module('analytics.models', ['ProductRecord', 'UserRecord', 'UserSearch', 
5 5
                                             'UserProductView'])
6 6
 

oscar/analytics/models.py → oscar/apps/analytics/models.py Visa fil

@@ -1,8 +1,8 @@
1 1
 from django.dispatch import receiver
2 2
 
3
-from oscar.analytics.abstract_models import (AbstractProductRecord, AbstractUserRecord,
3
+from oscar.apps.analytics.abstract_models import (AbstractProductRecord, AbstractUserRecord,
4 4
                                              AbstractUserProductView, AbstractUserSearch)
5
-from oscar.services import import_module
5
+from oscar.core.loading import import_module
6 6
 
7 7
 product_signals = import_module('product.signals', ['product_viewed', 'product_search'])
8 8
 basket_signals = import_module('basket.signals', ['basket_addition'])

oscar/analytics/reports.py → oscar/apps/analytics/reports.py Visa fil

@@ -1,6 +1,6 @@
1 1
 import csv
2 2
 
3
-from oscar.services import import_module
3
+from oscar.core.loading import import_module
4 4
 report_classes = import_module('reports.reports', ['ReportGenerator'])
5 5
 analytics_models = import_module('analytics.models', ['ProductRecord', 'UserRecord'])
6 6
 

oscar/checkout/__init__.py → oscar/apps/basket/__init__.py Visa fil


oscar/basket/abstract_models.py → oscar/apps/basket/abstract_models.py Visa fil

@@ -7,7 +7,7 @@ from django.db import models
7 7
 from django.utils.translation import ugettext as _
8 8
 from django.core.exceptions import ObjectDoesNotExist
9 9
 
10
-from oscar.basket.managers import OpenBasketManager, SavedBasketManager
10
+from oscar.apps.basket.managers import OpenBasketManager, SavedBasketManager
11 11
 
12 12
 # Basket statuses
13 13
 OPEN, MERGED, SAVED, SUBMITTED = ("Open", "Merged", "Saved", "Submitted")

oscar/basket/admin.py → oscar/apps/basket/admin.py Visa fil

@@ -1,6 +1,6 @@
1 1
 from django.contrib import admin
2 2
 
3
-from oscar.services import import_module
3
+from oscar.core.loading import import_module
4 4
 models = import_module('basket.models', ['Basket', 'Line', 'LineAttribute'])
5 5
 
6 6
 

oscar/basket/factory.py → oscar/apps/basket/factory.py Visa fil

@@ -2,7 +2,7 @@ import zlib
2 2
 
3 3
 from django.conf import settings
4 4
 
5
-from oscar.services import import_module
5
+from oscar.core.loading import import_module
6 6
 basket_models = import_module('basket.models', ['Basket', 'Line'])
7 7
 offer_utils = import_module('offer.utils', ['Applicator'])
8 8
 

oscar/basket/forms.py → oscar/apps/basket/forms.py Visa fil


oscar/basket/managers.py → oscar/apps/basket/managers.py Visa fil


oscar/basket/models.py → oscar/apps/basket/models.py Visa fil

@@ -3,7 +3,7 @@ from exceptions import Exception
3 3
 from django.core.signals import request_finished
4 4
 from django.dispatch import receiver
5 5
 
6
-from oscar.basket.abstract_models import (AbstractBasket, AbstractLine, AbstractLineAttribute,
6
+from oscar.apps.basket.abstract_models import (AbstractBasket, AbstractLine, AbstractLineAttribute,
7 7
                                           OPEN, MERGED, SAVED, SUBMITTED)
8 8
 
9 9
 

oscar/basket/reports.py → oscar/apps/basket/reports.py Visa fil

@@ -1,6 +1,6 @@
1 1
 import csv
2 2
 
3
-from oscar.services import import_module
3
+from oscar.core.loading import import_module
4 4
 report_classes = import_module('reports.reports', ['ReportGenerator'])
5 5
 basket_models = import_module('basket.models', ['Basket', 'OPEN', 'SUBMITTED'])
6 6
 

oscar/basket/signals.py → oscar/apps/basket/signals.py Visa fil


oscar/basket/tests.py → oscar/apps/basket/tests.py Visa fil

@@ -2,8 +2,8 @@ from django.utils import unittest
2 2
 from django.test.client import Client
3 3
 from django.core.urlresolvers import reverse
4 4
 
5
-from oscar.basket.models import * 
6
-from oscar.product.models import Item, ItemClass
5
+from oscar.apps.basket.models import * 
6
+from oscar.apps.product.models import Item, ItemClass
7 7
 
8 8
 
9 9
 class BasketModelTest(unittest.TestCase):

oscar/basket/urls.py → oscar/apps/basket/urls.py Visa fil

@@ -1,6 +1,6 @@
1 1
 from django.conf.urls.defaults import *
2 2
 
3
-from oscar.basket.views import BasketView, LineView, SavedLineView
3
+from oscar.apps.basket.views import BasketView, LineView, SavedLineView
4 4
 
5 5
 def line_view(request, *args, **kwargs):
6 6
     return LineView()(request, *args, **kwargs)

oscar/basket/views.py → oscar/apps/basket/views.py Visa fil

@@ -5,8 +5,8 @@ from django.core.urlresolvers import reverse
5 5
 from django.contrib import messages
6 6
 from django.core.exceptions import ObjectDoesNotExist
7 7
 
8
-from oscar.views import ModelView
9
-from oscar.services import import_module
8
+from oscar.view.generic import ModelView
9
+from oscar.core.loading import import_module
10 10
 
11 11
 basket_models = import_module('basket.models', ['Basket', 'Line', 'InvalidBasketLineError'])
12 12
 basket_forms = import_module('basket.forms', ['FormFactory'])

oscar/customer/__init__.py → oscar/apps/checkout/__init__.py Visa fil


oscar/checkout/calculators.py → oscar/apps/checkout/calculators.py Visa fil


oscar/checkout/core_views.py → oscar/apps/checkout/core_views.py Visa fil

@@ -2,7 +2,7 @@ from django.http import HttpResponse, Http404, HttpResponseRedirect, HttpRespons
2 2
 from django.contrib import messages
3 3
 from django.core.urlresolvers import reverse
4 4
 
5
-from oscar.services import import_module
5
+from oscar.core.loading import import_module
6 6
 basket_factory = import_module('basket.factory', ['BasketFactory'])
7 7
 checkout_calculators = import_module('checkout.calculators', ['OrderTotalCalculator'])
8 8
 order_models = import_module('order.models', ['Order', 'ShippingAddress'])

oscar/checkout/decorators.py → oscar/apps/checkout/decorators.py Visa fil


oscar/checkout/forms.py → oscar/apps/checkout/forms.py Visa fil

@@ -1,6 +1,6 @@
1 1
 from django.forms import ModelForm
2 2
 
3
-from oscar.services import import_module
3
+from oscar.core.loading import import_module
4 4
 
5 5
 address_models = import_module('address.models', ['Country'])
6 6
 order_models = import_module('order.models', ['ShippingAddress'])

oscar/checkout/signals.py → oscar/apps/checkout/signals.py Visa fil


oscar/checkout/tests.py → oscar/apps/checkout/tests.py Visa fil

@@ -2,7 +2,7 @@ from django.utils import unittest
2 2
 from django.test.client import Client
3 3
 from django.core.urlresolvers import reverse
4 4
 
5
-from oscar.checkout.utils import ProgressChecker
5
+from oscar.apps.checkout.utils import ProgressChecker
6 6
         
7 7
 class CheckoutViewsTest(unittest.TestCase):
8 8
     

oscar/checkout/urls.py → oscar/apps/checkout/urls.py Visa fil

@@ -1,7 +1,7 @@
1 1
 from django.conf.urls.defaults import *
2 2
 
3
-from oscar.views import class_based_view
4
-from oscar.services import import_module
3
+from oscar.core.decorators import class_based_view
4
+from oscar.core.loading import import_module
5 5
 
6 6
 checkout_views = import_module('checkout.views', ['IndexView', 'ShippingAddressView',
7 7
                                                   'ShippingMethodView', 'PaymentMethodView', 'OrderPreviewView',

oscar/checkout/utils.py → oscar/apps/checkout/utils.py Visa fil

@@ -1,6 +1,6 @@
1 1
 from django.core.urlresolvers import resolve
2 2
 
3
-from oscar.services import import_module
3
+from oscar.core.loading import import_module
4 4
 
5 5
 shipping_methods = import_module('shipping.repository', ['Repository'])
6 6
 

oscar/checkout/views.py → oscar/apps/checkout/views.py Visa fil

@@ -12,8 +12,8 @@ from django.core.urlresolvers import resolve
12 12
 from django.core.exceptions import ObjectDoesNotExist
13 13
 from django.utils.translation import ugettext as _
14 14
 
15
-from oscar.views import ModelView
16
-from oscar.services import import_module
15
+from oscar.view.generic import ModelView
16
+from oscar.core.loading import import_module
17 17
 
18 18
 basket_factory = import_module('basket.factory', ['BasketFactory'])
19 19
 checkout_forms = import_module('checkout.forms', ['ShippingAddressForm'])

oscar/customer/templatetags/__init__.py → oscar/apps/customer/__init__.py Visa fil


oscar/customer/history_helpers.py → oscar/apps/customer/history_helpers.py Visa fil

@@ -3,7 +3,7 @@ import json
3 3
 from django.dispatch import receiver
4 4
 from django.conf import settings
5 5
 
6
-from oscar.services import import_module
6
+from oscar.core.loading import import_module
7 7
 product_signals = import_module('product.signals', ['product_viewed'])
8 8
 
9 9
 MAX_PRODUCTS = getattr(settings, 'OSCAR_RECENTLY_VIEWED_PRODUCTS', 5)

oscar/datacash/__init__.py → oscar/apps/customer/templatetags/__init__.py Visa fil


oscar/customer/templatetags/history_tags.py → oscar/apps/customer/templatetags/history_tags.py Visa fil

@@ -1,6 +1,6 @@
1 1
 from django import template
2 2
 
3
-from oscar.services import import_module
3
+from oscar.core.loading import import_module
4 4
 product_models = import_module('product.models', ['Item', 'ItemClass'])
5 5
 history_helpers = import_module('customer.history_helpers', ['get_recently_viewed_product_ids'])
6 6
 

oscar/customer/tests.py → oscar/apps/customer/tests.py Visa fil

@@ -3,8 +3,8 @@ from django.test.client import Client
3 3
 from django.core.urlresolvers import reverse
4 4
 from django.http import HttpRequest
5 5
 
6
-from oscar.customer.history_helpers import get_recently_viewed_product_ids
7
-from oscar.test_helpers import create_product
6
+from oscar.apps.customer.history_helpers import get_recently_viewed_product_ids
7
+from oscar.test.helpers import create_product
8 8
 
9 9
 class HistoryHelpersTest(unittest.TestCase):
10 10
     

oscar/customer/urls.py → oscar/apps/customer/urls.py Visa fil

@@ -1,15 +1,15 @@
1 1
 from django.conf.urls.defaults import *
2 2
 from django.contrib.auth.decorators import login_required
3 3
 
4
-from oscar.views import class_based_view
5
-from oscar.customer.views import OrderHistoryView, OrderDetailView, OrderLineView, AddressBookView, AddressView
4
+from oscar.core.decorators import class_based_view
5
+from oscar.apps.customer.views import OrderHistoryView, OrderDetailView, OrderLineView, AddressBookView, AddressView
6 6
 
7 7
 urlpatterns = patterns('django.contrib.auth.views',
8 8
     url(r'^login/$', 'login', {'template_name': 'admin/login.html'}, name='oscar-customer-login'),
9 9
     url(r'^logout/$', 'login', name='oscar-customer-logout'),
10 10
 )
11 11
 
12
-urlpatterns = patterns('oscar.customer.views',
12
+urlpatterns = patterns('oscar.apps.customer.views',
13 13
     url(r'^profile/$', 'profile', name='oscar-customer-profile'),
14 14
     url(r'^order-history/$', OrderHistoryView.as_view(), name='oscar-customer-order-history'),
15 15
     url(r'^order/(?P<order_number>[\w-]*)/$', login_required(class_based_view(OrderDetailView)), name='oscar-customer-order-view'),

oscar/customer/views.py → oscar/apps/customer/views.py Visa fil

@@ -5,9 +5,9 @@ from django.core.urlresolvers import reverse
5 5
 from django.http import HttpResponseRedirect
6 6
 from django.contrib import messages
7 7
 
8
-from oscar.address.forms import UserAddressForm
9
-from oscar.views import ModelView
10
-from oscar.services import import_module
8
+from oscar.apps.address.forms import UserAddressForm
9
+from oscar.view.generic import ModelView
10
+from oscar.core.loading import import_module
11 11
 address_models = import_module('address.models', ['UserAddress'])
12 12
 order_models = import_module('order.models', ['Order', 'Line'])
13 13
 basket_models = import_module('basket.models', ['Basket'])

oscar/discount/__init__.py → oscar/apps/datacash/__init__.py Visa fil


oscar/datacash/abstract_models.py → oscar/apps/datacash/abstract_models.py Visa fil


oscar/datacash/models.py → oscar/apps/datacash/models.py Visa fil

@@ -1,7 +1,7 @@
1 1
 u"""Vanilla implementation of Datacash models"""
2 2
 from django.db import models
3 3
 
4
-from oscar.datacash.abstract_models import Transaction
4
+from oscar.apps.datacash.abstract_models import Transaction
5 5
 
6 6
 class Transaction(AbstractTransaction):
7 7
     pass

oscar/datacash/utils.py → oscar/apps/datacash/utils.py Visa fil


oscar/image/__init__.py → oscar/apps/discount/__init__.py Visa fil


oscar/discount/abstract_models.py → oscar/apps/discount/abstract_models.py Visa fil


oscar/discount/admin.py → oscar/apps/discount/admin.py Visa fil

@@ -1,6 +1,6 @@
1 1
 from django.contrib import admin
2 2
 
3
-from oscar.services import import_module
3
+from oscar.core.loading import import_module
4 4
 models = import_module('discount.models', ['DiscountOffer'])
5 5
 
6 6
 class DiscountOfferAdmin(admin.ModelAdmin):

oscar/discount/models.py → oscar/apps/discount/models.py Visa fil

@@ -1,4 +1,4 @@
1
-from oscar.discount.abstract_models import (AbstractDiscountOffer, PERCENTAGE_DISCOUNT, 
1
+from oscar.apps.discount.abstract_models import (AbstractDiscountOffer, PERCENTAGE_DISCOUNT, 
2 2
                                             ABSOLUTE_DISCOUNT, FINAL_PRICE)
3 3
 
4 4
 class DiscountOffer(AbstractDiscountOffer):

oscar/discount/tests.py → oscar/apps/discount/tests.py Visa fil

@@ -3,8 +3,8 @@ import datetime
3 3
 
4 4
 from django.utils import unittest
5 5
 
6
-from oscar.test_helpers import create_product
7
-from oscar.discount.models import DiscountOffer, PERCENTAGE_DISCOUNT, ABSOLUTE_DISCOUNT, FINAL_PRICE 
6
+from oscar.test.helpers import create_product
7
+from oscar.apps.discount.models import DiscountOffer, PERCENTAGE_DISCOUNT, ABSOLUTE_DISCOUNT, FINAL_PRICE 
8 8
 
9 9
 
10 10
 class PercentageDiscountOfferTest(unittest.TestCase):

oscar/offer/__init__.py → oscar/apps/image/__init__.py Visa fil


oscar/image/abstract_models.py → oscar/apps/image/abstract_models.py Visa fil


oscar/image/admin.py → oscar/apps/image/admin.py Visa fil

@@ -1,4 +1,5 @@
1 1
 from django.contrib import admin
2
-from oscar.image.models import *
2
+
3
+from oscar.apps.image.models import *
3 4
 
4 5
 admin.site.register(Image)

+ 5
- 0
oscar/apps/image/models.py Visa fil

@@ -0,0 +1,5 @@
1
+from oscar.apps.image.abstract_models import AbstractImage
2
+
3
+class Image(AbstractImage):
4
+    pass
5
+

oscar/order/__init__.py → oscar/apps/image/tests.py Visa fil


oscar/image/views.py → oscar/apps/image/views.py Visa fil


oscar/order_management/__init__.py → oscar/apps/offer/__init__.py Visa fil


oscar/offer/abstract_models.py → oscar/apps/offer/abstract_models.py Visa fil

@@ -6,7 +6,7 @@ from django.db import models
6 6
 from django.utils.translation import ugettext as _
7 7
 from django.core.exceptions import ValidationError
8 8
 
9
-from oscar.offer.managers import ActiveOfferManager
9
+from oscar.apps.offer.managers import ActiveOfferManager
10 10
 
11 11
 SITE, VOUCHER, USER, SESSION = ("Site", "Voucher", "User", "Session")
12 12
 

oscar/offer/admin.py → oscar/apps/offer/admin.py Visa fil

@@ -1,6 +1,6 @@
1 1
 from django.contrib import admin
2 2
 
3
-from oscar.services import import_module
3
+from oscar.core.loading import import_module
4 4
 models = import_module('offer.models', ['ConditionalOffer', 'Condition', 'Benefit', 'Range',
5 5
                                         'Voucher', 'VoucherApplication'])
6 6
 

oscar/offer/fixtures/sample-voucher.json → oscar/apps/offer/fixtures/sample-voucher.json Visa fil


oscar/offer/managers.py → oscar/apps/offer/managers.py Visa fil


oscar/offer/models.py → oscar/apps/offer/models.py Visa fil

@@ -7,7 +7,7 @@ from django.db import models
7 7
 from django.utils.translation import ugettext as _
8 8
 from django.core.exceptions import ValidationError
9 9
 
10
-from oscar.offer.managers import ActiveOfferManager
10
+from oscar.apps.offer.managers import ActiveOfferManager
11 11
 
12 12
 SITE, VOUCHER, USER, SESSION = ("Site", "Voucher", "User", "Session")
13 13
 
@@ -570,4 +570,4 @@ class MultibuyDiscountBenefit(Benefit):
570 570
         return cheapest_line
571 571
 
572 572
 # We need to import receivers at the bottom of this script
573
-from oscar.offer.receivers import receive_basket_voucher_change
573
+from oscar.apps.offer.receivers import receive_basket_voucher_change

oscar/offer/receivers.py → oscar/apps/offer/receivers.py Visa fil

@@ -1,7 +1,7 @@
1 1
 from django.dispatch import receiver
2 2
 from django.db.models.signals import m2m_changed, post_save
3 3
 
4
-from oscar.services import import_module
4
+from oscar.core.loading import import_module
5 5
 offer_models = import_module('offer.models', ['Voucher'])
6 6
 order_models = import_module('order.models', ['OrderDiscount'])
7 7
 

oscar/offer/reports.py → oscar/apps/offer/reports.py Visa fil

@@ -1,6 +1,6 @@
1 1
 import csv
2 2
 
3
-from oscar.services import import_module
3
+from oscar.core.loading import import_module
4 4
 report_classes = import_module('reports.reports', ['ReportGenerator'])
5 5
 offer_models = import_module('offer.models', ['Voucher', 'ConditionalOffer'])
6 6
 

oscar/offer/tests.py → oscar/apps/offer/tests.py Visa fil

@@ -4,11 +4,11 @@ import datetime
4 4
 from django.utils import unittest
5 5
 from django.test.client import Client
6 6
 
7
-from oscar.offer.models import * 
8
-from oscar.basket.models import Basket
9
-from oscar.product.models import Item, ItemClass
10
-from oscar.stock.models import Partner, StockRecord
11
-from oscar.test_helpers import create_product
7
+from oscar.apps.offer.models import * 
8
+from oscar.apps.basket.models import Basket
9
+from oscar.apps.product.models import Item, ItemClass
10
+from oscar.apps.stock.models import Partner, StockRecord
11
+from oscar.test.helpers import create_product
12 12
 
13 13
 
14 14
 class RangeTest(unittest.TestCase):

oscar/offer/utils.py → oscar/apps/offer/utils.py Visa fil

@@ -1,7 +1,7 @@
1 1
 from decimal import Decimal
2 2
 from itertools import chain
3 3
 
4
-from oscar.services import import_module
4
+from oscar.core.loading import import_module
5 5
 offer_models = import_module('offer.models', ['ConditionalOffer'])
6 6
 
7 7
 

oscar/offer/views.py → oscar/apps/offer/views.py Visa fil


oscar/payment/__init__.py → oscar/apps/order/__init__.py Visa fil


oscar/order/abstract_models.py → oscar/apps/order/abstract_models.py Visa fil


oscar/order/admin.py → oscar/apps/order/admin.py Visa fil

@@ -1,6 +1,6 @@
1 1
 from django.contrib import admin
2 2
 
3
-from oscar.services import import_module
3
+from oscar.core.loading import import_module
4 4
 models = import_module('order.models', ['Order', 'OrderNote', 'CommunicationEvent', 'CommunicationEventType',
5 5
                                         'BillingAddress', 'ShippingAddress', 'Line',
6 6
                                         'LinePrice', 'ShippingEvent', 'ShippingEventType', 

oscar/order/fixtures/initial_data.json → oscar/apps/order/fixtures/initial_data.json Visa fil


oscar/order/fixtures/sample-order.json → oscar/apps/order/fixtures/sample-order.json Visa fil


oscar/order/models.py → oscar/apps/order/models.py Visa fil

@@ -1,8 +1,8 @@
1 1
 u"""Vanilla implementation of order models"""
2 2
 from django.db import models
3 3
 
4
-from oscar.order.abstract_models import *
5
-from oscar.address.abstract_models import AbstractShippingAddress, AbstractBillingAddress
4
+from oscar.apps.order.abstract_models import *
5
+from oscar.apps.address.abstract_models import AbstractShippingAddress, AbstractBillingAddress
6 6
 
7 7
 class Order(AbstractOrder):
8 8
     pass

oscar/order/reports.py → oscar/apps/order/reports.py Visa fil

@@ -1,6 +1,6 @@
1 1
 import csv
2 2
 
3
-from oscar.services import import_module
3
+from oscar.core.loading import import_module
4 4
 report_classes = import_module('reports.reports', ['ReportGenerator'])
5 5
 order_models = import_module('order.models', ['Order'])
6 6
 

oscar/order/signals.py → oscar/apps/order/signals.py Visa fil


oscar/order/tests.py → oscar/apps/order/tests.py Visa fil

@@ -2,9 +2,9 @@ from decimal import Decimal
2 2
 
3 3
 from django.test import TestCase
4 4
 
5
-from oscar.address.models import Country
6
-from oscar.basket.models import Basket
7
-from oscar.order.models import ShippingAddress, Order, Line, ShippingEvent, ShippingEventType, ShippingEventQuantity
5
+from oscar.apps.address.models import Country
6
+from oscar.apps.basket.models import Basket
7
+from oscar.apps.order.models import ShippingAddress, Order, Line, ShippingEvent, ShippingEventType, ShippingEventQuantity
8 8
 
9 9
 ORDER_PLACED = 'order_placed'
10 10
 

oscar/order/utils.py → oscar/apps/order/utils.py Visa fil

@@ -1,6 +1,6 @@
1 1
 from django.contrib.sites.models import Site
2 2
 
3
-from oscar.services import import_module
3
+from oscar.core.loading import import_module
4 4
 order_models = import_module('order.models', ['ShippingAddress', 'Order', 'Line', 
5 5
                                               'LinePrice', 'LineAttribute', 'OrderDiscount'])
6 6
 order_signals = import_module('order.signals', ['order_placed'])

oscar/product/__init__.py → oscar/apps/order_management/__init__.py Visa fil


oscar/order_management/urls.py → oscar/apps/order_management/urls.py Visa fil

@@ -1,8 +1,8 @@
1 1
 from django.conf.urls.defaults import *
2 2
 from django.contrib.admin.views.decorators import staff_member_required
3 3
 
4
-from oscar.views import class_based_view
5
-from oscar.order_management.views import OrderListView, OrderView
4
+from oscar.core.decorators import class_based_view
5
+from oscar.apps.order_management.views import OrderListView, OrderView
6 6
 
7 7
 urlpatterns = patterns('oscar.order_management.views',
8 8
     url(r'^$', staff_member_required(OrderListView.as_view()), name='oscar-order-management-list'),

oscar/order_management/views.py → oscar/apps/order_management/views.py Visa fil

@@ -7,8 +7,8 @@ from django.views.generic import ListView, DetailView
7 7
 from django.contrib import messages
8 8
 from django.db import transaction
9 9
 
10
-from oscar.views import ModelView
11
-from oscar.services import import_module
10
+from oscar.view.generic import ModelView
11
+from oscar.core.loading import import_module
12 12
 order_models = import_module('order.models', ['Order', 'Line', 'ShippingEvent', 'ShippingEventQuantity', 
13 13
                                               'ShippingEventType', 'PaymentEvent', 'PaymentEventType', 'OrderNote'])
14 14
 

oscar/promotions/__init__.py → oscar/apps/payment/__init__.py Visa fil


oscar/payment/abstract_models.py → oscar/apps/payment/abstract_models.py Visa fil


oscar/payment/admin.py → oscar/apps/payment/admin.py Visa fil

@@ -1,6 +1,6 @@
1 1
 from django.contrib import admin
2 2
 
3
-from oscar.services import import_module
3
+from oscar.core.loading import import_module
4 4
 models = import_module('payment.models', ['Source', 'Transaction', 'SourceType'])
5 5
 
6 6
 class SourceAdmin(admin.ModelAdmin):

oscar/payment/forms.py → oscar/apps/payment/forms.py Visa fil

@@ -4,7 +4,7 @@ import re
4 4
 
5 5
 from django import forms
6 6
 
7
-from oscar.services import import_module
7
+from oscar.core.loading import import_module
8 8
 
9 9
 address_models = import_module('address.models', ['Country'])
10 10
 order_models = import_module('order.models', ['BillingAddress'])

oscar/payment/models.py → oscar/apps/payment/models.py Visa fil

@@ -1,4 +1,4 @@
1
-from oscar.payment.abstract_models import *
1
+from oscar.apps.payment.abstract_models import *
2 2
 
3 3
 class Source(AbstractSource):
4 4
     pass

oscar/payment/tests.py → oscar/apps/payment/tests.py Visa fil

@@ -3,8 +3,8 @@ import datetime
3 3
 from django.test import TestCase
4 4
 from django.contrib.auth.models import User
5 5
 
6
-from oscar.payment.models import Bankcard
7
-from oscar.payment.forms import bankcard_type, VISA, MASTERCARD, AMEX, DISCOVER, BankcardNumberField, luhn
6
+from oscar.apps.payment.models import Bankcard
7
+from oscar.apps.payment.forms import bankcard_type, VISA, MASTERCARD, AMEX, DISCOVER, BankcardNumberField, luhn
8 8
 
9 9
 
10 10
 class BankcardTest(TestCase):

oscar/payment/views.py → oscar/apps/payment/views.py Visa fil


oscar/reports/__init__.py → oscar/apps/product/__init__.py Visa fil


oscar/product/abstract_models.py → oscar/apps/product/abstract_models.py Visa fil

@@ -10,7 +10,7 @@ from django.template.defaultfilters import slugify
10 10
 from django.core.urlresolvers import reverse
11 11
 from django.core.exceptions import ObjectDoesNotExist
12 12
 
13
-from oscar.product.managers import BrowsableItemManager
13
+from oscar.apps.product.managers import BrowsableItemManager
14 14
 
15 15
 def _convert_to_underscores(str):
16 16
     u"""

oscar/product/admin.py → oscar/apps/product/admin.py Visa fil

@@ -1,6 +1,6 @@
1 1
 from django.contrib import admin
2 2
 
3
-from oscar.services import import_module
3
+from oscar.core.loading import import_module
4 4
 product_models = import_module('product.models', ['Item', 'ItemClass', 'AttributeType', 
5 5
                                                   'ItemAttributeValue', 'Option', 'ProductRecommendation'])
6 6
 

oscar/product/fixtures/initial_data.json → oscar/apps/product/fixtures/initial_data.json Visa fil


oscar/product/fixtures/sample-products.json → oscar/apps/product/fixtures/sample-products.json Visa fil


oscar/product/managers.py → oscar/apps/product/managers.py Visa fil


oscar/product/models.py → oscar/apps/product/models.py Visa fil

@@ -1,22 +1,28 @@
1 1
 """
2 2
 Vanilla product models
3 3
 """
4
-from oscar.product.abstract_models import *
4
+from oscar.apps.product.abstract_models import *
5
+
5 6
 
6 7
 class ItemClass(AbstractItemClass):
7 8
     pass
8 9
 
10
+
9 11
 class Item(AbstractItem):
10 12
     pass
11 13
     
14
+    
12 15
 class AttributeType(AbstractAttributeType):
13 16
     pass
14 17
 
18
+
15 19
 class AttributeValueOption(AbstractAttributeValueOption):
16 20
     pass
17 21
 
22
+
18 23
 class ItemAttributeValue(AbstractItemAttributeValue):
19 24
     pass
20 25
 
26
+
21 27
 class Option(AbstractOption):
22 28
     pass

oscar/product/signals.py → oscar/apps/product/signals.py Visa fil


Vissa filer visades inte eftersom för många filer har ändrats

Laddar…
Avbryt
Spara