Search
 
SCRIPT & CODE EXAMPLE
 
CODE EXAMPLE FOR PYTHON

adding static file and its usage in Django

STATICFILES_DIRS = [
    BASE_DIR / "static",
    '/var/www/static/',
]
{% load static %}
<img src="{% static 'my_app/example.jpg' %}" alt="My image">
Source by soshace.com #
 
PREVIOUS NEXT
Tagged: #adding #static #file #usage #Django
ADD COMMENT
Topic
Name
8+2 =