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 950B

12345678910111213141516171819202122232425
  1. from django.conf.urls.defaults import patterns, url
  2. from oscar.apps.basket.views import BasketView, SavedView, VoucherView, VoucherAddView, BasketAddView
  3. from oscar.core.application import Application
  4. class BasketApplication(Application):
  5. name = 'basket'
  6. summary_view = BasketView
  7. saved_view = SavedView
  8. voucher_view = VoucherView
  9. add_view = BasketAddView
  10. add_voucher_view = VoucherAddView
  11. def get_urls(self):
  12. urlpatterns = patterns('',
  13. url(r'^$', self.summary_view.as_view(), name='summary'),
  14. url(r'^add/$', self.add_view.as_view(), name='add'),
  15. url(r'^vouchers/$', self.voucher_view.as_view(), name='vouchers'),
  16. url(r'^vouchers/add/$', self.add_voucher_view.as_view(), name='vouchers-add'),
  17. url(r'^saved/$', self.saved_view.as_view(), name='saved'),
  18. )
  19. return urlpatterns
  20. application = BasketApplication()