python - Django template with External CSS ; using {%static%} for images in a division -


i using django web app , encountered no image shown problem following code:

<div class="hexagon-in2" style="background:url(static/images/gallery/2.jpg)"> 

please situation.

if have defined media_url in settings.py

<div class="hexagon-in2" style="background:url("{{ media_url }}/images/gallery/2.jpg)"> 

// or static_url if use static files storing images , media


Comments

Popular posts from this blog

jQuery Mobile app not scrolling in Firefox -

c++ - How to add Crypto++ library to Qt project -

php array slice every 2th rule -