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

Popular posts from this blog

html5 - What is breaking my page when printing? -

html - Unable to style the color of bullets in a list -

c# - must be a non-abstract type with a public parameterless constructor in redis -