0
In your template instead of:
<img class="imgView" src="{{dashboard_image}}" alt="Dashboard画面.jpg"></img>
DO this:
<img class="imgView" src="{{dashboard_image.url}}" alt="Dashboard画面.jpg"></img>
0
<img class='img-responsive' src="{{ MEDIA_URL }}{{ item.image.url }}" />
or
<img class='img-responsive' src="{{ item.image.url }}" />
and in main urls.py
from django.conf import settings
from django.conf.urls.static import static
urlpatterns = [
# ... the rest of your URLconf goes here ...
] + static(settings.MEDIA_URL, document_root=settings.MEDIA_ROOT)
- [Django]-Creating a User Registration Page using MongoEngine
- [Django]-Custom widget not validating only the first time
- [Django]-Django with django-nose: two identical settings files with different behavior in running test command
- [Django]-Deleting the tags that are not used by any other object
- [Django]-Django: Sum by date and then create extra field showing rolling average
Source:stackexchange.com