title: Django won't serve static files while using development server
body: <p>I just started a new development server for a website I am working on and I can't seem to get the Django development server to serve the static files I have for CSS and other things. The CSS for the admin site loads fine. I am running it in a virtualenv sandbox.</p>
  
  <p>In settings.py I've messed around with MEDIA_ROOT and MEDIA_URL. </p>
  
  <p>So far for MEDIA_ROOT I've tried.</p>
  
  <pre><code>MEDIA_ROOT = '/home/wluw/wluw/wluw/media'
  </code></pre>
  
  <p>and </p>
  
  <pre><code>MEDIA_ROOT = os.path.join(os.path.dirname(__file__), 'media')
  </code></pre>
  
  <p>I changed my ADMIN_MEDIA_PREFIX to</p>
  
  <pre><code>ADMIN_MEDIA_PREFIX = '/admin_media/'
  </code></pre>
  
  <p>my MEDIA_URL looks like this</p>
  
  <pre><code>MEDIA_URL = '/media/'
  </code></pre>
  
  <p>and the urls.py section for the static files looks like this.</p>
  
  <pre><code>if settings.DEBUG:
  urlpatterns += patterns('',
       (r'^media/(?P&lt;path&gt;.*)$', 'django.views.static.serve',         
       {'document_root': settings.MEDIA_ROOT}),
  )
  </code></pre>
  
  <p>Here's the output from the dev server when I try to access the page.</p>
  
  <pre><code>[21/Jul/2011 21:19:25] "GET /media/css/style.css HTTP/1.1" 302 0
  [21/Jul/2011 21:19:25] "GET /media/css/style.css/ HTTP/1.1" 404 2561
  
  
  
  from django.conf.urls.defaults import patterns, include, handler500, handler404
  from django.conf import settings
  from django.contrib import admin
  import d51_django_admin_piston
  
  handler500 = 'radio.frontend.views.server_error'
  
  admin.autodiscover()
  d51_django_admin_piston.autodiscover(admin.site)
  
  urlpatterns = patterns(
  '',
  (r'^logs/', include('radio.logs.urls')),
  (r'^events/', include('radio.events.urls')),
  (r'^station/', include('radio.station.urls')),
  (r'^staff/', include('radio.staff.urls')),
  (r'^admin/', include(admin.site.urls)),
  (r'^accounts/login/$', 'django.contrib.auth.views.login'),
  (r'^', include('radio.frontend.urls')),
  )
  
  if settings.DEBUG:
  urlpatterns += patterns('',
       (r'^media/(?P&lt;path&gt;.*)$', 'django.views.static.serve',         
      # {'document_root': settings.MEDIA_ROOT}),
      {'document_root': settings.MEDIA_ROOT, 'show_indexes': True})
  )
  </code></pre>
  
  <p>Here is my radio.frontend.urls</p>
  
  <pre><code>from django.conf.urls.defaults import *
  
  
  urlpatterns = patterns('radio.frontend.views',
      url(r'^$', 'home', name='home'),
  )
  </code></pre>
  
  <p>Here is my settings.py
  <a href="http://pastebin.com/JTWAJFCz" rel="noreferrer">settings.py</a></p>
  
  <p>Everything was working fine on the production server having /media? being the url for css and other things.</p>
  
  <p>Also none of the content in the database is being shown. Each page of the site is created with a base.html and a viewname.html. Only the base.html part is showing up. I am sure this is a topic for an other question though.</p>
  
  <p>I've looked at a ton of other posts with people having the same problem and none of them provided a solution. I am completely stumped.</p>
  
  <p>Any help would be greatly appreciated. Thanks</p>