django, css working but js not working -
here settings.py,
static_url = '/static/' static_root = os.path.join(base_dir, 'static', 'static_root') staticfiles_dirs = ( os.path.join(base_dir, 'static', 'static_dirs'), ) media_root = os.path.join(base_dir, 'static', 'media') media_url = '/media/'
and base.html
<!doctype html> {% load staticfiles %} <script src="{{ static_url }}js/bootstrap.min.js" type="text/javascript"></script> <script type="text/javascript" src = "{% static 'js/docs.min.js' %}" ></script>
please help!!
you need jquery bootstrap, also:
<script src="{{ static_url }}js/bootstrap.min.js" type="text/javascript"></script>
should be
<script src="{% static 'js/bootstrap.min.js' %}" type="text/javascript"></script>
or
<script src='/static/js/bootstrap.min.js' type="text/javascript">
if have static_url in context need add slash "/",