title: Django1.11 - Show media on localhost
body: <p>I'm having hard time to display media on local system.. the problem is that:</p>
  
  <p><code>{{ producer.img.url }}</code></p>
  
  <p>gives me a url path relative to the page I'm browsing, so it always fails to locate the file. It actually prints something like:</p>
  
  <pre><code>media/media/djprofiles/john_0VtCrdA.jpg
  </code></pre>
  
  <p>which obviously fails (note the missing initial "/").</p>
  
  <p>Following Django docs, I added in my <strong>urls.py</strong>:</p>
  
  <pre><code>urlpatterns = [
      url(r'^i18n/', include('django.conf.urls.i18n')),
  ]
  urlpatterns += i18n_patterns(
      ...
  ) + static(settings.MEDIA_URL, document_root=settings.MEDIA_ROOT)
  </code></pre>
  
  <p>and <strong>settings.py</strong> is as follow:</p>
  
  <pre><code>MEDIA_ROOT = os.path.join(BASE_DIR, "media")
  MEDIA_URL = 'media/'
  </code></pre>
  
  <p>The <code>img</code> field is defined in <strong>models.py</strong> as follow:</p>
  
  <pre><code>img = models.ImageField(upload_to=settings.MEDIA_URL + 'djprofiles')
  </code></pre>
  
  <p>I know there are already many questions relative to showing media on local system, but none seems to provide me with a working solution.</p>