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

1234567891011121314151617181920212223
  1. from django.conf.urls import url
  2. from oscar.core.application import Application
  3. from oscar.core.loading import get_class
  4. class CommsDashboardApplication(Application):
  5. name = None
  6. default_permissions = ['is_staff', ]
  7. list_view = get_class('dashboard.communications.views', 'ListView')
  8. update_view = get_class('dashboard.communications.views', 'UpdateView')
  9. def get_urls(self):
  10. urls = [
  11. url(r'^$', self.list_view.as_view(), name='comms-list'),
  12. url(r'^(?P<slug>\w+)/$', self.update_view.as_view(),
  13. name='comms-update'),
  14. ]
  15. return self.post_process_urls(urls)
  16. application = CommsDashboardApplication()