how to set background imag django code example
Example 1: background image css django
#third{
background: url("/static/img/sample.jpeg") 50% 0 no-repeat fixed;
color: white;
height: 650px;
padding: 100px 0 0 0;
}
Example 2: add background image in django uploaded file
{% load static %}
<img src="{% static "my_app/example.jpg" %}" alt="My image"/>