Html
{% load staticfiles %}
<html>
<head>
<script src="{% static "js/fillform.js" %}" type="text/javascript">
</script>
</head>
<body>
yo man ssup
<button type="button" id="button">
click
</button>
</body>
</html>
settings.py
STATIC_URL = '/static/'
STATICFILES_DIRS = (
os.path.join(BASE_DIR, 'static'),
)
and upon loading it gives error
[HTTP/1.0 404 Not Found 16ms]
And project tree -
bio
-- static
|-- bio
|-- js
|-- template
-- template
|--bio
|-- index.html
How to solve this error.?
Raja Simon
10.3k5 gold badges46 silver badges77 bronze badges
asked Jan 13, 2015 at 17:37
aquaman
1,6685 gold badges25 silver badges39 bronze badges
1 Answer 1
Based on your project directory layout it looks like you are missing bio from your path:
{% static "bio/js/fillform.js" %}
answered Jan 13, 2015 at 17:45
Scott Woodall
10.7k7 gold badges41 silver badges37 bronze badges
Sign up to request clarification or add additional context in comments.
Comments
Explore related questions
See similar questions with these tags.
default
BASE_DIRset to? Also make sure youimport OSin your settings.py.