Answer the question
In order to leave comments, you need to log in
Why doesn't it show media files?
When clicking on an image link, it gives a 404 error page.
urls.py
from django.conf.urls import url
from django.conf import settings
from django.conf.urls.static import static
from django.views.defaults import server_error, page_not_found, permission_denied
urlpatterns = [
#urls
] + static(settings.MEDIA_URL, document_root=settings.MEDIA_ROOT, show_indexes=True)
handler403 = curry(permission_denied, template_name='403.html')
handler404 = curry(page_not_found, template_name='404.html')
handler500 = curry(server_error, template_name='500.html')
Answer the question
In order to leave comments, you need to log in
Didn't find what you were looking for?
Ask your questionAsk a Question
731 491 924 answers to any question