js images djangoi code example
Example 1: add static file in django
STATICFILES_DIRS = [
BASE_DIR / "static",
'/var/www/static/',
]
Example 2: image in django
<html>
<head>
{% load staticfiles %} <!-- Prepare django to load static files -->
</head>
<body>
<img src={% static "image.jpg" %}>
</body>
</html>