[Answered ]-Django file-browser and error 404

2👍

Ok, here is the solution:

https://docs.djangoproject.com/en/1.9/howto/static-files/#serving-static-files-during-development

The issue was that I was testing django-filebrowser with development server

0👍

You are not putting url for displaying image.
In setting.py-

MEDIA_ROOT = os.path.join(BASE_DIR, "media/") 
MEDIA_URL = '/media/' 
In URLs.py--
Url(r'^media/(?^<path>.*)$','django.views.static.serve',{'document_root':
 settings.MEDIA_ROOT,}),

I think it can help you

0👍

You can do:

from django.conf.urls.static import static
from django.conf import settings

urlpatterns = [
    #your urls
]

if settings.DEBUG: # will be 'True' in development
    urlpatterns += static(settings.STATIC_URL, document_root=settings.STATIC_ROOT)
    urlpatterns += static(settings.MEDIA_URL, document_root=settings.MEDIA_ROOT)

Leave a comment