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.2KB

123456789101112131415161718192021222324252627282930313233
  1. from django.conf.urls.defaults import patterns, url, include
  2. from oscar.core.application import Application
  3. from oscar.apps.catalogue.app import application as catalogue_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.search.app import application as search_app
  9. class Shop(Application):
  10. name = None
  11. catalogue_app = catalogue_app
  12. customer_app = customer_app
  13. basket_app = basket_app
  14. checkout_app = checkout_app
  15. promotions_app = promotions_app
  16. search_app = search_app
  17. def get_urls(self):
  18. urlpatterns = patterns('',
  19. (r'products/', include(self.catalogue_app.urls)),
  20. (r'basket/', include(self.basket_app.urls)),
  21. (r'checkout/', include(self.checkout_app.urls)),
  22. (r'accounts/', include(self.customer_app.urls)),
  23. (r'search/', include(self.search_app.urls)),
  24. (r'', include(self.promotions_app.urls)),
  25. )
  26. return urlpatterns
  27. shop = Shop()