Commit 0b21e0fe authored by John Red Medrano's avatar John Red Medrano

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

* commit '91e4be99':
  fixing
parents 162a6405 91e4be99
from .base import * from .base import *
import configparser import configparser
DEBUG = False DEBUG = True
ALLOWED_HOSTS = ['*'] ALLOWED_HOSTS = ['*']
# CORS_ORIGIN_ALLOW_ALL = True # CORS_ORIGIN_ALLOW_ALL = True
......
...@@ -20,7 +20,6 @@ from app.applicationlayer.management.notification import views as notifview ...@@ -20,7 +20,6 @@ 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 = [
...@@ -33,17 +32,12 @@ urlpatterns = [ ...@@ -33,17 +32,12 @@ 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')),
] ]
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: \ No newline at end of file
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