Commit 91e4be99 authored by John Red Medrano's avatar John Red Medrano

fixing

parent ade61076
from .base import *
import configparser
DEBUG = False
DEBUG = True
ALLOWED_HOSTS = ['*']
# CORS_ORIGIN_ALLOW_ALL = True
......
......@@ -20,7 +20,6 @@ from app.applicationlayer.management.notification import views as notifview
from django.views.static import serve
from django.conf import settings
from django.conf.urls.static import static
import django.views.static
urlpatterns = [
......@@ -33,8 +32,8 @@ urlpatterns = [
url(r'^chat/$', notifview.index, name='index'),
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'^static/(?P<path>.*)$', serve,{'document_root': settings.STATIC_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}),
path('api/v1/asset-management/', include('app.applicationlayer.ams.urls_ams')),
]
......@@ -42,8 +41,3 @@ urlpatterns = [
if settings.DEBUG:
urlpatterns += static(settings.MEDIA_URL, document_root=settings.MEDIA_ROOT)
urlpatterns += static(settings.STATIC_URL, document_root=settings.STATIC_ROOT)
\ No newline at end of file
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