- url(r'^admin/doc/', include('django.contrib.admindocs.urls')),
- url(r'^admin/', include(admin.site.urls)),
-
- url(r'^accounts/', include('accounts.urls')),
-
- url(r'^%s(?P<path>.+)$' % settings.MEDIA_URL[1:], 'django.views.static.serve',
- {'document_root': settings.MEDIA_ROOT, 'show_indexes': True}),
-)
-
-
+ path('admin/doc/', include('django.contrib.admindocs.urls')),
+ path('admin/', admin.site.urls),
+
+ path('accounts/', include('accounts.urls')),
+ path('services/', include('services.urls')),
+ path('ssh/', include('ssh_keys.urls')),
+ path('auth/', include('django.contrib.auth.urls')),
+]
+
+
+if settings.DEBUG:
+ from django.views.static import serve
+ urlpatterns += [
+ path('media/<path>', serve, {
+ 'document_root': settings.MEDIA_ROOT,
+ }),
+ ]