Hi Folks,
When I'm using my javasscript/jquery code inside django template then it's working fine but when I'm save it in external file called main.js then it's functionality not responding but url is working.I did all the process but still problem is same??
Myproject:
| myproject
| myapp
| static
| css
| style.css ( this is working fine )
.....
| js
| main.js ( url is working but functionality is not working )
settings.py :
STATIC_URL = '/static/'
STATIC_ROOT = os.path.join(BASE_DIR,'assets')
STATICFILES_DIRS = [
('favicons',os.path.join(BASE_DIR,'static','favicons')),
('images',os.path.join(BASE_DIR,'static','images')),
('css',os.path.join(BASE_DIR,'static','css')),
('js',os.path.join(BASE_DIR,'static','js')),
]
base.html:
{% load staticfiles %}
<link rel="stylesheet" href="{% static 'css/style.css'%}">
<script type="text/javascript" src="{% static 'js/main.js'%}"></script>
Please help me guys. I attached some screen shot for your better understand.
Thank You.
Regards,
Soumen