title: django media not loading
body: <p>So using django for the first time and ran into this issue where the media url does not want to load/work so far my urls.py is setup like so</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>my settings.py like so</p>
  
  <pre><code>PROJECT_ROOT = os.path.abspath(os.path.dirname(__file__))
  MEDIA_ROOT = os.path.join(PROJECT_ROOT, 'media')
  MEDIA_URL = '/media/'
  ADMIN_MEDIA_PREFIX = 'http:/localhost:8000/admin-media/'
  </code></pre>
  
  <p>my html template like so</p>
  
  <pre><code>&lt;link rel="stylesheet" href="/media/css/template.css" type="text/css" /&gt;
  &lt;link rel="stylesheet" href="/media/css/nivo-slider.css" type="text/css" /&gt;
  &lt;script type="text/javascript" src="/media/js/jquery-1.4.3.min.js"&gt;&lt;/script&gt;
  &lt;script type="text/javascript" src="/media/js/jquery.nivo.slider.pack.js"&gt;&lt;/script&gt;
  </code></pre>
  
  <p>Whenever I type in <a href="http://localhost:8000/media/css/template.css" rel="nofollow">http://localhost:8000/media/css/template.css</a> I get </p>
  
  <pre><code>AttributeError at /media/css/template.css/
  
  'str' object has no attribute 'resolve'
  </code></pre>
  
  <p>and in my django server log the following </p>
  
  <pre><code>    Traceback (most recent call last):
  
    File "C:\Python27\lib\site-packages\django\core\servers\basehttp.py", line 283, in run
      self.result = application(self.environ, self.start_response)
  
    File "C:\Python27\lib\site-packages\django\core\handlers\wsgi.py", line 272, in __call__
      response = self.get_response(request)
  
    File "C:\Python27\lib\site-packages\django\core\handlers\base.py", line 169, in get_response
      response = self.handle_uncaught_exception(request, resolver, sys.exc_info())
  
    File "C:\Python27\lib\site-packages\django\core\handlers\base.py", line 218, in handle_uncaught_exception
      return callback(request, **param_dict)
  
    File "C:\Python27\lib\site-packages\django\utils\decorators.py", line 93, in _wrapped_view
      response = view_func(request, *args, **kwargs)
  
    File "C:\Python27\lib\site-packages\django\views\defaults.py", line 30, in server_error
      t = loader.get_template(template_name) # You need to create a 500.html template.
  
    File "C:\Python27\lib\site-packages\django\template\loader.py", line 157, in get_template
      template, origin = find_template(template_name)
  
    File "C:\Python27\lib\site-packages\django\template\loader.py", line 138, in find_template
      raise TemplateDoesNotExist(name)
  
      TemplateDoesNotExist: 500.html
  </code></pre>
  
  <p>When I type <a href="http://localhost:8000/home/" rel="nofollow">http://localhost:8000/home/</a> my page loads but none of my css or javascript is loaded..</p>