I'm having trouble loading CSS for my Django template.
I have the following settings:
STATIC_ROOT = '' STATIC_URL = '/css/' STATICFILES_DIRS = ("/css") INSTALLED_APPS = ( 'django.contrib.staticfiles', )
Do I need to use both static_url and staticfiles_dirs ?
urls.py -
urlpatterns = patterns('', (r'^$',homefun), )
views.py -
def homefun(request): return render_to_response('home.html')
And the parent template is base.html, which loads css.
<link rel="stylesheet" type="text/css" href="/css/style.css" />
source share