I want to write Django code into CSS style tag in HTML elements in order to get images from static directory. here is my original code
<a href="single.html" class="img" style="background-image: url(images/image_1.jpg);"></a>
i tried with the below code
<a href="single.html" class="img" style="background-image: {% static 'images/image_1.jpg' %};"></a>
but this isn't worked for me, how can i solve this problem? NB: i used {% load static %} to load all static files, css and js works fine but i became failed to do this.