I'm using django development server to study how to create template. But my local js file not loading. The js is working fine in jsfiddle.
Here's my html file.
{% load staticfiles %}
<!DOCTYPE html>
<html>
<head>
<title>Test</title>
<link rel="stylesheet" href="http://code.jquery.com/ui/1.10.3/themes/smoothness/jquery-ui.css" />
<link rel="stylesheet" type="text/css" href="{% static "css/encoder_view.css" %}" />
<script type="text/javascript" src="http://code.jquery.com/jquery-1.9.1.js"></script>
<script type="text/javascript" src="http://code.jquery.com/ui/1.10.3/jquery-ui.js"></script>
<!--This external file-->
<script type="text/javascript" scr="{% static "js/encoder_view.js" %}"></script>
</head>
<body>
<table>
<tr id="top-border">
<td width="120">
<input id="check-all" class="checkbox" name="selector" type="checkbox" style="width:15px;"/>
<span id="testcheck">Check All</span>
</td>
</tr>
</table>
</body>
</html>
Following Thomas Orozco instruction
and after using manage.py collectstatic all my static files is now in D:\Test_app\static
directory
In my settings.py file:
STATIC_ROOT = 'D:/Test_app/static/'
STATIC_URL = '/static/'
STATICFILES_DIRS = ( "D:/Test_app/static",)
INSTALLED_APPS = ( 'django.contrib.staticfiles', ...
Can anyone give me direction how to solve this. Thanks in advance!