where to put js files in flask
<script src="{{url_for('static', filename='somejavascriptfile.js')}}"></script>
where to put js files in flask
<script src="{{url_for('static', filename='somejavascriptfile.js')}}"></script>
css and js on flask
<!-- Put in HTML file-->
<!--
JS
parent_dir is reletive to Flask app.py dir
meaning: /main/app.py
/main/parent_dir/file.js
-->
<script src="{{url_for('parent_dir', filename='file.js')}}"></script>
<!--
CSS
parent_dir is reletive to Flask app.py dir
meaning: /main/app.py
/main/parent_dir/file.css
-->
<link href="{{ url_for("parent_dir",filename="file.css") }}" rel="stylesheet">
how to add js in flask
<script src="{{url_for('static', filename='js/modernizr-2.6.2.min.js')}}"></script>
Copyright © 2021 Codeinu
Forgot your account's password or having trouble logging into your Account? Don't worry, we'll help you to get back your account. Enter your email address and we'll send you a recovery link to reset your password. If you are experiencing problems resetting your password contact us