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

1234567891011121314151617181920212223242526272829303132333435
  1. from django.conf.urls import include, url
  2. from django.conf import settings
  3. from django.conf.urls.i18n import i18n_patterns
  4. from django.contrib import admin
  5. from django.conf.urls.static import static
  6. from oscar.app import application
  7. from oscar.views import handler500, handler404, handler403 # noqa
  8. admin.autodiscover()
  9. urlpatterns = [
  10. # Include admin as convenience. It's unsupported and you should
  11. # use the dashboard
  12. url(r'^admin/', include(admin.site.urls)),
  13. # i18n URLS need to live outside of i18n_patterns scope of the shop
  14. url(r'^i18n/', include('django.conf.urls.i18n')),
  15. ]
  16. # Prefix Oscar URLs with language codes
  17. urlpatterns += i18n_patterns('',
  18. # Oscar's normal URLs
  19. url(r'', include(application.urls)),
  20. )
  21. if settings.DEBUG:
  22. import debug_toolbar
  23. # Server statics and uploaded media
  24. urlpatterns += static(settings.MEDIA_URL,
  25. document_root=settings.MEDIA_ROOT)
  26. urlpatterns += [
  27. url(r'^__debug__/', include(debug_toolbar.urls)),
  28. ]