I have a model that has an image field, at the beginning the image was shown, but after I made a few changes but without changing the code that serves the image now it does not work, I have tried everything but it does not work, this is the code of the setting:
setting.py
MEDIA_ROOT = 'media/'
MEDIA_URL = 'http://localhost:8000/media/'
this is the url.py from django.views.static import serve
urlpatterns = [
url(r'^media/(?P<path>.*)$', serve, {'document_root': settings.MEDIA_ROOT}),]
and this is my template
I omit the other code because I consider it unnecessary for this.