Commit b61e2437 authored by John Red Medrano's avatar John Red Medrano

fixing

parent 585665c8
......@@ -30,7 +30,7 @@ class ChangeRequestTemplateAttachmentsSerializer(
"contact_no": instance.uploaded_by.contact_no
}
ret['uploaded_by'] = user_object
# ret['file_upload'] = settings.MEDIA_URL
ret['file_upload'] = instance.file_upload.url.url
return ret
# except Exception as e:
# ret['uploaded_by'] = "none"
......
......@@ -37,8 +37,8 @@ urlpatterns = [
re_path(r'^media/(?P<path>.*)$', serve,{'document_root': settings.MEDIA_ROOT}),
# re_path(r'^static/(?P<path>.*)$', serve,{'document_root': settings.STATIC_ROOT}),
]
] + static(settings.MEDIA_URL, document_root=settings.MEDIA_ROOT)
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
# 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
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