0

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
1
  • What is the BASE_DIR set to? Also make sure you import OS in your settings.py. Commented Jan 13, 2015 at 17:49

1 Answer 1

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
Sign up to request clarification or add additional context in comments.

Comments

Your Answer

Draft saved
Draft discarded

Sign up or log in

Sign up using Google
Sign up using Email and Password

Post as a guest

Required, but never shown

Post as a guest

Required, but never shown

By clicking "Post Your Answer", you agree to our terms of service and acknowledge you have read our privacy policy.

Start asking to get answers

Find the answer to your question by asking.

Ask question

Explore related questions

See similar questions with these tags.