title: Django 1.4 serving MEDIA_URL and STATIC_URL files on development server
body: <p>Just upgraded to Django 1.4, and having serious trouble with the new 'improved' serving of static and media files on development server. I love Django, but why on earth they have made serving these files doubly more complicated with STATIC_URL,STATIC_ROOT, STATICFILES_DIR now is utterly beyond me. </p>
  
  <p>I'm simply trying to serve all files, static and uploaded, on the development server. I have the STATIC_URL files working, after much experimentation, but I simply cannot get the MEDIA_URL files to be served as well. </p>
  
  <p>Settings:</p>
  
  <pre><code>DIRNAME = os.path.dirname(__file__)
  MEDIA_ROOT = os.path.join(DIRNAME, 'media/')
  MEDIA_URL = '/media/'
  STATIC_ROOT = ''
  STATIC_URL = '/static/'
  STATICFILES_DIRS = ()
  </code></pre>
  
  <p>I've got the media and static context processors added:</p>
  
  <pre><code>TEMPLATE_CONTEXT_PROCESSORS = (
  "django.contrib.auth.context_processors.auth",
  "django.core.context_processors.debug",
  "django.core.context_processors.i18n",
  'django.core.context_processors.media',
  'django.core.context_processors.static',
  "django.core.context_processors.request",
  'satchmo_store.shop.context_processors.settings',
  'django.contrib.messages.context_processors.messages',
  </code></pre>
  
  <p>)</p>
  
  <p>and I've added in the url confs:</p>
  
  <pre><code># serve static and uploaded files in DEV
  urlpatterns += staticfiles_urlpatterns()
  urlpatterns + static(settings.MEDIA_URL, document_root=settings.MEDIA_ROOT)
  </code></pre>
  
  <p>with the two conf settings added as indicated in the docs, first one for static, second for media.</p>
  
  <p>my structure, website being an app and static dir placed inside it as instructed on djangoproject:</p>
  
  <pre><code>&lt;myproject&gt;
    --media
    --settings
    --templates
    --website
        |-&gt;static
  </code></pre>
  
  <p>In templates I can serve static content no problem with </p>
  
  <pre><code>{{STATIC_URL}}css/style.css
  </code></pre>
  
  <p>But any uploaded image, this one using photologue, is not served, but the urls are correct:</p>
  
  <pre><code>/media/photologue/photos/cache/spawning-2_admin_thumbnail.jpg
  </code></pre>
  
  <p>That directory structure does exit under media/</p>
  
  <p>Super, super confused. It all seems so ridiculously complicated now, whereas I never had any issues before.</p>