Dodata opcija da yaml template da moze da koristi html i django template

This commit is contained in:
2025-02-19 19:34:45 +01:00
parent b128ce6915
commit e1aafb9172
2 changed files with 25 additions and 10 deletions

View File

@@ -1,8 +1,15 @@
<h1> {{ document.organization.name }} - Risk Report </h1>
<p> created at: {{ document.created_at|date:'Y-m-d' }}</p>
- segment_type: "h1"
content: "{{ document.organization.name }} - Risk Report"
risks:
{% for item in risks_with_controls %}
- segment_type: "body"
content: "Created at: {{ document.created_at|date:'Y-m-d' }}"
- segment_type: "h2"
content: "Risks"
- segment_type: "body"
content: |
{% for item in risks_with_controls %}
<div class="risk">
<h3>Risk: {{ item.risk.name }}</h3>
<div class="controls">
@@ -15,4 +22,4 @@ risks:
{% endfor %}
</div>
</div>
{% endfor %}
{% endfor %}