My project base directory is, then app and static dirs as below. I am trying to load CSS and JS. These does get rendered in the html but when I try to open the js css files directly in the browser for verification to see if the page is really addressed, it gives a page not found an error. What is missing here? How do I do this?
/data/projectname/ #BASE_DIR
/data/projectname/app/
/data/projectname/app/statics/
/data/projectname/app/statics/js/
Settings
STATICFILES_DIRS = (
os.path.join(BASE_DIR, '/app/statics/'),
)
View
<script type="text/javascript" src="/app/statics/js/css-doodle.min.js"></script>
{% load static %}
<script type="text/javascript" href="{% static 'js/css-doodle.min.js' %}"></script>
HTML rendered, tried both ways
<script type="text/javascript" src="/app/statics/js/css-doodle.min.js"></script>
renders home page instead of showing the actual js
<script type="text/javascript" href="/static/js/css-doodle.min.js"></script>
404 page not found, it should show raw js file if it is truly properly included/addressed.debug output doesnt give any details