title: Django is not serving media files uploaded by user on heroku
body: <p>I have tried everything but somehow i cannot see images uploaded by user.I have deployed code on heroku and every static file is getting loaded properly. User is even going to correct path of image  but somehow server is showing errors of not finding image.</p>
  
  <pre><code>Settings.py
   # Static files (CSS, JavaScript, Images)
  # https://docs.djangoproject.com/en/1.8/howto/static-files/
  
  STATIC_ROOT = os.path.join(PROJECT_ROOT, 'staticfiles')
  STATIC_URL = '/static/'
  
  # Extra places for collectstatic to find static files.
  #STATICFILES_DIRS = (
  #    os.path.join(PROJECT_ROOT, 'static'),
  #)
  
  STATICFILES_DIRS = (
      os.path.join(PROJECT_ROOT, 'static'),
  )
  
  MEDIA_ROOT = os.path.join(BASE_DIR, 'media')
  MEDIA_URL = '/media/'
  
  Models.py
  #this is for photos upload by user
  class You(models.Model):
      user = models.ForeignKey(User,null=True)
      name=models.CharField(max_length=30,blank=True,default='pictures/videos')
      docfile = models.FileField(upload_to='documents/%Y/%m/%d', null=True,blank=True)
  
      def __unicode__(self):
          return self.user.username
  
  #Views.py(To upload files)
  @login_required
  def upload(request):
  
      if request.method == 'POST':
  
          newdoc = You(docfile = request.FILES['file'],user=request.user)
          newdoc.save()
          msg='dee'
              # Redirect to the document list after POST
          return HttpResponse(json.dumps({'message': msg}))
  
      else:
          form = DocumentForm()
  
  
  
      # Render list page with the documents and the form
      return render(request,'mat_upload.html',{'form':form})
  
  Template(gallery.html)
  {% for document in documents %}
  &lt;img class="img-responsive" src="{{MEDIA_URL}}/media/{{ document.docfile }}" alt="hiiii" style="max-width: 100%;
      height: 250px;" /&gt;
  {% endfor %}
  
  @login_required
  def gallery(request):
      documents =  You.objects.filter(user=request.user)
  
      return render(request,'gallery.html',{'documents': documents,})
  Urls.py
  from django.conf.urls import include, url
  
  from django.contrib import admin
  
  from django.conf import settings
  from django.conf.urls.static import static
  from django.contrib.staticfiles.urls import staticfiles_urlpatterns
  from django.views.generic import RedirectView
  admin.autodiscover()
  
  import harpoons.views
  
  
  urlpatterns = [
  
      url(r'^admin/', include(admin.site.urls)),
      url(r'^', include('harp.urls')),
      url(r'^password_reset_recover/', include('password_reset.urls')),
      url(r'^accounts/', include('allauth.urls')),
  
  
  
  
  ]
  </code></pre>