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

1234567891011121314151617181920
  1. from django.conf.urls import patterns, url
  2. from oscar.apps.offer import views
  3. from oscar.core.application import Application
  4. class OfferApplication(Application):
  5. name = 'offer'
  6. detail_view = views.OfferDetailView
  7. list_view = views.OfferListView
  8. def get_urls(self):
  9. urlpatterns = patterns('',
  10. url(r'^$', self.list_view.as_view(), name='list'),
  11. url(r'^(?P<slug>[\w-]+)/$', self.detail_view.as_view(), name='detail'),
  12. )
  13. return self.post_process_urls(urlpatterns)
  14. application = OfferApplication()