feat: render document or fragment
This commit is contained in:
@@ -1,8 +0,0 @@
|
||||
<thead>
|
||||
<tr><th>foo</th><th>bar</th><th>baz</th></tr>
|
||||
</thead>
|
||||
<tbody>
|
||||
{% for row in table %}
|
||||
<tr><td>{{ row.foo }}</td><td>{{ row.bar }}</td><td>{{ row.baz }}</td></tr>
|
||||
{% endfor %}
|
||||
</tbody>
|
||||
7
templates/fragment/user/table.html
Normal file
7
templates/fragment/user/table.html
Normal file
@@ -0,0 +1,7 @@
|
||||
<tr><th>name</th><th>email</th></tr>
|
||||
{% for user in users.as_ref().unwrap() %}
|
||||
<tr>
|
||||
<td>{{ user.name }}</td>
|
||||
<td>{{ user.email }}</td>
|
||||
</tr>
|
||||
{% endfor %}
|
||||
Reference in New Issue
Block a user