Cant see image from project directory
<p>I tried to handle this but I gave up. I have folder with images and I want to display my some image in html view but It wont work.</p>

<p>I followed this tutorial <a href="https://docs.djangoproject.com/en/1.10/howto/static-files/#serving-files-uploaded-by-a-user-during-development" rel="nofollow">enter link description here</a></p>

<p>this my project tree:</p>

<p><a href="http://i.stack.imgur.com/nbegK.png" rel="nofollow"><img src="http://i.stack.imgur.com/nbegK.png" alt="enter image description here"></a></p>

<p>As you can see I tried to create plenty of directories to make it work. </p>

<p>This is my settins:</p>

<pre><code>STATIC_URL = '/static/'

# STATICFILES_DIRS = [
#     os.path.join(BASE_DIR, "media"),
#     '/webstore/',
# ]

MEDIA_ROOT = '/webstore/media/'
MEDIA_URL = '/media/'
</code></pre>

<p>this is my html view where I try to display my image</p>

<pre><code>&lt;img src="/media/example.jpg" /&gt;
</code></pre>

<p>this is my <code>urls.py</code> file</p>

<pre><code>    from django.conf.urls import url, include
from django.contrib import admin
from djangoproject import settings
from django.conf.urls.static import static

urlpatterns = [
    url(r'^', include('webstore.urls')),
    url(r'^admin/', admin.site.urls),
] + static(settings.MEDIA_URL, document_root=settings.MEDIA_ROOT)
</code></pre>

<p>The only thing you have to do is</p>

<pre><code>MEDIA_ROOT = '/absolutepath/to/djangoproject/webstore/media/'
</code></pre>

<p>Then you have already</p>

<pre><code>MEDIA_URL = '/media/'
</code></pre>

<p>and try </p>

<pre><code>&lt;img src="/media/example.jpg" /&gt;
</code></pre>

python django