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.

urls.py 1.3KB

1234567891011121314151617181920212223242526272829303132333435363738394041424344
  1. from django.conf.urls import include, url
  2. from django.conf import settings
  3. from django.contrib import admin
  4. from django.conf.urls.static import static
  5. from stores.app import application as stores_app
  6. from stores.dashboard.app import application as dashboard_app
  7. from apps.app import application
  8. from datacash.dashboard.app import application as datacash_app
  9. # These need to be imported into this namespace
  10. from oscar.views import handler500, handler404, handler403 # noqa
  11. js_info_dict = {
  12. 'packages': ('stores',),
  13. }
  14. admin.autodiscover()
  15. urlpatterns = [
  16. url(r'^admin/', include(admin.site.urls)),
  17. url(r'^i18n/', include('django.conf.urls.i18n')),
  18. url(r'^jsi18n/$', 'django.views.i18n.javascript_catalog', js_info_dict),
  19. # Stores extension
  20. url(r'^stores/', include(stores_app.urls)),
  21. url(r'^dashboard/stores/', include(dashboard_app.urls)),
  22. # PayPal extension
  23. url(r'^checkout/paypal/', include('paypal.express.urls')),
  24. # Datacash extension
  25. url(r'^dashboard/datacash/', include(datacash_app.urls)),
  26. url(r'', include(application.urls)),
  27. ]
  28. if settings.DEBUG:
  29. import debug_toolbar
  30. urlpatterns += static(settings.MEDIA_URL,
  31. document_root=settings.MEDIA_ROOT)
  32. urlpatterns += [
  33. url(r'^__debug__/', include(debug_toolbar.urls)),
  34. ]