Commit 162a6405 authored by John Red Medrano's avatar John Red Medrano

Merge pull request #663 in RMS/api-main-service from red-develop to product-dev

* commit 'ade61076':
  testing
parents 2aeaba81 ade61076
...@@ -20,6 +20,7 @@ from app.applicationlayer.management.notification import views as notifview ...@@ -20,6 +20,7 @@ from app.applicationlayer.management.notification import views as notifview
from django.views.static import serve from django.views.static import serve
from django.conf import settings from django.conf import settings
from django.conf.urls.static import static from django.conf.urls.static import static
import django.views.static
urlpatterns = [ urlpatterns = [
...@@ -32,8 +33,8 @@ urlpatterns = [ ...@@ -32,8 +33,8 @@ urlpatterns = [
url(r'^chat/$', notifview.index, name='index'), url(r'^chat/$', notifview.index, name='index'),
url(r'^chat/(?P<room_name>[^/]+)/$', notifview.room, name='room'), url(r'^chat/(?P<room_name>[^/]+)/$', notifview.room, name='room'),
re_path(r'^media/(?P<path>.*)$', serve,{'document_root': settings.MEDIA_ROOT}), # re_path(r'^media/(?P<path>.*)$', serve,{'document_root': settings.MEDIA_ROOT}),
re_path(r'^static/(?P<path>.*)$', serve,{'document_root': settings.STATIC_ROOT}), # re_path(r'^static/(?P<path>.*)$', serve,{'document_root': settings.STATIC_ROOT}),
path('api/v1/asset-management/', include('app.applicationlayer.ams.urls_ams')), path('api/v1/asset-management/', include('app.applicationlayer.ams.urls_ams')),
] ]
...@@ -41,3 +42,8 @@ urlpatterns = [ ...@@ -41,3 +42,8 @@ urlpatterns = [
if settings.DEBUG: if settings.DEBUG:
urlpatterns += static(settings.MEDIA_URL, document_root=settings.MEDIA_ROOT) urlpatterns += static(settings.MEDIA_URL, document_root=settings.MEDIA_ROOT)
urlpatterns += static(settings.STATIC_URL, document_root=settings.STATIC_ROOT) urlpatterns += static(settings.STATIC_URL, document_root=settings.STATIC_ROOT)
else:
urlpatterns += [
url(r'^static/(?P<path>.*)$', django.views.static.serve, {'document_root': settings.STATIC_ROOT, 'show_indexes': settings.DEBUG}),
url(r'^media/(?P<path>.*)$', django.views.static.serve, {'document_root': settings.MEDIA_ROOT, 'show_indexes': settings.DEBUG})
]
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment