No matter what i do i can't get my css to load. 100% Frustrated with
Django. My index page loads when i request http://127.0.0.1:8000/ but
it is not styled. Django dev server returns 404 in console for "GET /
css/styles.css HTTP/1.1"

In my base template i have:
<link rel="stylesheet" type="text/css" href="/css/styles.css">

In my urls.py I have:
urlpatterns = patterns('',
     (r'^$', 'proj.app.views.index'),
     (r'^admin/(.*)', admin.site.root),
     (r'^media/(?P<path>.*)$', 'django.views.static.serve',
{'document_root': settings.MEDIA_ROOT}),
)

In my settings.py i have (among other things):
import os
SETTINGS_FILE_FOLDER = os.path.dirname(__file__)
MEDIA_ROOT = os.path.join(SETTINGS_FILE_FOLDER, 'media')
MEDIA_URL = 'http://127.0.0.1:8000/media/'
ADMIN_MEDIA_PREFIX =  'adminmedia'

my directory structure in windows is:

c:\dev
   -\proj
      __init__.py
      manage.py
      settings.py
      urls.py
      -\app
      -__init__.py
      -admin.py
      -models.py
      -views.py
      -\adminmedia
      -\media
        -\css
          -styles.css
        -\images
      -\templates
        -base.html
        -index.html




--~--~---------~--~----~------------~-------~--~----~
You received this message because you are subscribed to the Google Groups 
"Django users" group.
To post to this group, send email to django-users@googlegroups.com
To unsubscribe from this group, send email to 
django-users+unsubscr...@googlegroups.com
For more options, visit this group at 
http://groups.google.com/group/django-users?hl=en
-~----------~----~----~----~------~----~------~--~---

Reply via email to