with django app, how to link to image in .css file -
so in website, make , in css, do
#logo { background: url(../images/logo.jpg); }
however, no since using django project, image in
c:\users\me\documents\mysite\myapp\static\images
and .css file in
c:\users\me\documents\mysite\myapp\static\css
in settings.py, static_root is
static_root = 'c:/users/me/documents/mysite/myapp/static'
i tried doing
#logo { background: url({{ static_url }}/images/logo.jpg); }
but didn't work. idea i'm doing wrong , how fix it?
since have both directories in same path "static", usual:
#logo { background: url(../images/logo.jpg); }
Comments
Post a Comment