Вы не можете выбрать более 25 тем Темы должны начинаться с буквы или цифры, могут содержать дефисы(-) и должны содержать не более 35 символов.

1234567891011121314151617181920212223242526272829303132333435363738394041424344454647
  1. from django.conf.urls import patterns, url, include
  2. from oscar.apps.dashboard import views
  3. from oscar.core.application import Application
  4. from oscar.core.loading import get_class
  5. class DashboardApplication(Application):
  6. name = 'dashboard'
  7. permissions_map = {
  8. 'index': (['is_staff'], ['partner.dashboard_access']),
  9. }
  10. index_view = views.IndexView
  11. reports_app = get_class('dashboard.reports.app', 'application')
  12. orders_app = get_class('dashboard.orders.app', 'application')
  13. users_app = get_class('dashboard.users.app', 'application')
  14. catalogue_app = get_class('dashboard.catalogue.app', 'application')
  15. promotions_app = get_class('dashboard.promotions.app', 'application')
  16. pages_app = get_class('dashboard.pages.app', 'application')
  17. partners_app = get_class('dashboard.partners.app', 'application')
  18. offers_app = get_class('dashboard.offers.app', 'application')
  19. ranges_app = get_class('dashboard.ranges.app', 'application')
  20. reviews_app = get_class('dashboard.reviews.app', 'application')
  21. vouchers_app = get_class('dashboard.vouchers.app', 'application')
  22. comms_app = get_class('dashboard.communications.app', 'application')
  23. def get_urls(self):
  24. urls = [
  25. url(r'^$', self.index_view.as_view(), name='index'),
  26. url(r'^catalogue/', include(self.catalogue_app.urls)),
  27. url(r'^reports/', include(self.reports_app.urls)),
  28. url(r'^orders/', include(self.orders_app.urls)),
  29. url(r'^users/', include(self.users_app.urls)),
  30. url(r'^content-blocks/', include(self.promotions_app.urls)),
  31. url(r'^pages/', include(self.pages_app.urls)),
  32. url(r'^partners/', include(self.partners_app.urls)),
  33. url(r'^offers/', include(self.offers_app.urls)),
  34. url(r'^ranges/', include(self.ranges_app.urls)),
  35. url(r'^reviews/', include(self.reviews_app.urls)),
  36. url(r'^vouchers/', include(self.vouchers_app.urls)),
  37. url(r'^comms/', include(self.comms_app.urls)),
  38. ]
  39. return self.post_process_urls(patterns('', *urls))
  40. application = DashboardApplication()