Capitalizado el MENU :-) con Filtro

This commit is contained in:
fenix 2024-02-13 16:55:08 +01:00
parent aea2e19453
commit 9b54135efe
2 changed files with 11 additions and 1 deletions

View File

@ -0,0 +1,7 @@
{# templates/_navigation.html #}
<nav>
{% for menu_item in ["home", "results"] %}
<a href="{{ url_for(menu_item)}}">{{ menu_item|upper }}</a>
{% endfor %}
</nav>

View File

@ -9,6 +9,9 @@
</head> </head>
<body> <body>
<header>
{% include "_navigation.html" %}
</header>
{% block content %} {% block content %}
<h1>Welcome to {{ title }}!</h1> <h1>Welcome to {{ title }}!</h1>
{% endblock content %} {% endblock content %}