Static files in Django – Python
Static files in Django – Python
You need to create a static folder/Directory in the root of your project
├───core
│ ├───migrations
│ │ └───__pycache__
│ └───__pycache__
├───school
│ └───__pycache__
├───static
└───templates
settings.py
<div> <div>STATIC_URL = '/static/'</div> <div>STATICFILES_DIRS = [BASE_DIR/"static"]</div> </div>
index.html file
{% load static %} <div> <div><img width="300" height="200" src="{% static 'urdu.png' %}" alt="My image"></div> </div>