urls.py 858 B

123456789101112131415161718192021222324252627
  1. import django
  2. from django.conf.urls import include, url
  3. from django.contrib import admin
  4. admin.autodiscover()
  5. try:
  6. from django.urls import path
  7. urlpatterns = [
  8. url(r'^jet/', include('jet.urls', 'jet')),
  9. url(r'^jet/dashboard/', include('jet.dashboard.urls', 'jet-dashboard')),
  10. url(r'^admin/doc/', include('django.contrib.admindocs.urls')),
  11. path('admin/', admin.site.urls),
  12. ]
  13. except ImportError: # Django < 2.0
  14. urlpatterns = [
  15. url(r'^jet/', include('jet.urls', 'jet')),
  16. url(r'^jet/dashboard/', include('jet.dashboard.urls', 'jet-dashboard')),
  17. url(r'^admin/doc/', include('django.contrib.admindocs.urls')),
  18. url(r'^admin/', include(admin.site.urls)),
  19. ]
  20. if django.VERSION[:2] < (1, 8):
  21. from django.conf.urls import patterns
  22. urlpatterns = patterns('', *urlpatterns)