This is driving me insane. I've done it what feels like 6 different
ways and for whatever reason, none of them appear to work. The worst
part is it's something so simple: I want to link to a css file on my
system. Why does this have to be so ridiculous before I get the
project into production? Here are the two tutorials that seem the most
relevant:

https://docs.djangoproject.com/en/dev/ref/contrib/staticfiles/#std:setting-STATICFILES_DIRS

http://stackoverflow.com/questions/446026/django-how-do-you-serve-media-stylesheets-and-link-to-them-within-templates

And here's what I have:

settings.py
STATIC_ROOT = '/Users/digitallimit/DjangoProjects/mherodev/'
STATIC_URL = '/static/'
ADMIN_MEDIA_PREFIX = '/static/admin'
STATICFILES_DIRS = (
)
STATICFILES_FINDERS = (
    'django.contrib.staticfiles.finders.FileSystemFinder',
    'django.contrib.staticfiles.finders.AppDirectoriesFinder',
)

urls.py
if settings.DEBUG:
    urlpatterns += patterns('',
        (r'^static/(?P<path>.*)$', 'django.views.static.serve',
{'document_root': settings.STATIC_ROOT}),
    )

Worst cast, I'll just embed the CSS directly, but this is silly. It
should be the easiest thing in the world.

-- 
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