Search
 
SCRIPT & CODE EXAMPLE
 
CODE EXAMPLE FOR PYTHON

flask conditional according to urrl

<!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 by stackoverflow.com #
 
PREVIOUS NEXT
Tagged: #flask #conditional #urrl
ADD COMMENT
Topic
Name
5+5 =