fastapi-dynamic-response/templates/another_example.html
2024-10-15 15:53:32 -05:00

20 lines
539 B
HTML

{% extends "base.html" %}
{% block title %}Another Example{% endblock %}
{% block content %}
<h2 class='text-gray-400 font-bold text-2xl'>Example</h2>
<p>
{{ data.message }}
</p>
<h3 class='mt-4 text-gray-400 font-bold text-xl'>Items</h3>
<p class='text-gray-300 my-4'>
there are {{ data.get('items', [])|length }} items in the list
</p>
<ul class='list-disc ml-8'>
{% for item in data.get('items', []) %}
<li>{{ item }}</li>
{% endfor %}
</ul>
{% endblock %}