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

123456789101112131415161718192021222324252627282930313233343536
  1. from django.conf.urls import patterns, include, url
  2. from django.conf import settings
  3. from django.contrib import admin
  4. from django.conf.urls.static import static
  5. from oscar.app import shop
  6. # These simply need to be imported into this namespace. Ignore the PEP8
  7. # warning that they aren't used.
  8. from oscar.views import handler500, handler404, handler403
  9. admin.autodiscover()
  10. urlpatterns = patterns('',
  11. (r'^admin/', include(admin.site.urls)),
  12. # Custom functionality to allow dashboard users to be created
  13. (r'^gateway/', include('apps.gateway.urls')),
  14. (r'', include(shop.urls)),
  15. )
  16. # Allow rosetta to be used to add translations
  17. if 'rosetta' in settings.INSTALLED_APPS:
  18. urlpatterns += patterns('',
  19. (r'^rosetta/', include('rosetta.urls')),
  20. )
  21. if settings.DEBUG:
  22. # Server statics and uploaded media
  23. urlpatterns += static(settings.MEDIA_URL,
  24. document_root=settings.MEDIA_ROOT)
  25. # Allow error pages to be tested
  26. urlpatterns += patterns('',
  27. url(r'^403$', handler403),
  28. url(r'^404$', handler404),
  29. url(r'^500$', handler500)
  30. )