You can not select more than 25 topics Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.

app.py 1.4KB

12345678910111213141516171819202122232425262728293031323334
  1. from django.conf.urls.defaults import patterns, url, include
  2. from oscar.core.application import Application
  3. from oscar.apps.product.app import application as product_app
  4. from oscar.apps.customer.app import application as customer_app
  5. from oscar.apps.basket.app import application as basket_app
  6. from oscar.apps.checkout.app import application as checkout_app
  7. from oscar.apps.promotions.app import application as promotions_app
  8. from oscar.apps.order_management.app import application as order_management_app
  9. class Shop(Application):
  10. name = None
  11. product_app = product_app
  12. customer_app = customer_app
  13. basket_app = basket_app
  14. checkout_app = checkout_app
  15. promotions_app = promotions_app
  16. order_management_app = order_management_app
  17. def get_urls(self):
  18. urlpatterns = patterns('',
  19. (r'products/', include(self.product_app.urls)),
  20. (r'basket/', include(self.basket_app.urls)),
  21. (r'checkout/', include(self.checkout_app.urls)),
  22. (r'order-management/', include(self.order_management_app.urls)),
  23. (r'accounts/', include(self.customer_app.urls)),
  24. (r'reports/', include('oscar.apps.reports.urls')),
  25. (r'search/', include('oscar.apps.search.urls')),
  26. (r'^$', include(self.promotions_app.urls)),
  27. )
  28. return urlpatterns
  29. shop = Shop()