Question : flask conditional according to urrl
Answered by : defeated-dogfish-puu9brtjq93n
<!DOCTYPE html>
<html>
<head> <title>Template</title>
</head>
<body> <h3>You are here: {{ request.path }}</h3> {% if request.path == url_for('show_funding') %} <script src="{{ url_for ('static', filename='js/funding.js')}}"></script> {% endif %}
</body>
</html>
Source : https://stackoverflow.com/questions/46942687/flask-conditional-inserting-of-script-based-on-url | Last Update : Thu, 03 Dec 20