Django_Static_File
Outside Application
settings.py
STATIC_DIR = os.path.join(BASE_DIR, 'static')
STATICFILES_DIRS = [STATIC_DIR]
{% load static %}
CSS File Add
<link rel="stylesheet" href="{% static 'css/style.css' %}" />
JS File Add
<script src="{% static 'js/all.js' %}"></script>
Inside Application
{% load static %}
CSS File Add
<link rel="stylesheet" href=" {% static "app/css/all.min.css" %} ">
JS File Add
<script src=" {% static "app/css/all.min.css" %} "></script>
Comments
Post a Comment