Dodata opcija da yaml template da moze da koristi html i django template
This commit is contained in:
@@ -1,37 +1,18 @@
|
||||
- segment_type: "title"
|
||||
content: "Document Title"
|
||||
<h1> {{ document.organization.name }} - Risk Report </h1>
|
||||
<p> created at: {{ document.created_at|date:'Y-m-d' }}</p>
|
||||
|
||||
- segment_type: "subtitle"
|
||||
content: "Document Subtitle"
|
||||
|
||||
- segment_type: "h1"
|
||||
content: "Introduction"
|
||||
|
||||
- segment_type: "body"
|
||||
content: "{{ dynamic_intro }}"
|
||||
|
||||
- segment_type: "h2"
|
||||
content: "Section 1: Details"
|
||||
|
||||
- segment_type: "body"
|
||||
content: |
|
||||
<p>This is a static section with an embedded HTML table:</p>
|
||||
<table>
|
||||
<tr>
|
||||
<th>Header 1</th>
|
||||
<th>Header 2</th>
|
||||
</tr>
|
||||
<tr>
|
||||
<td>Data 1</td>
|
||||
<td>Data 2</td>
|
||||
</tr>
|
||||
</table>
|
||||
|
||||
- segment_type: "quote"
|
||||
content: "{{ dynamic_quote }}"
|
||||
|
||||
- segment_type: "h3"
|
||||
content: "Subsection 1.1"
|
||||
|
||||
- segment_type: "body"
|
||||
content: "{{ dynamic_subsection }}"
|
||||
risks:
|
||||
{% for item in risks_with_controls %}
|
||||
<div class="risk">
|
||||
<h3>Risk: {{ item.risk.name }}</h3>
|
||||
<div class="controls">
|
||||
<h4>Mitigating Controls:</h4>
|
||||
{% for control in item.controls %}
|
||||
<div class="control">
|
||||
<span class="name">{{ control.control__name }}</span> -
|
||||
<span class="weight">Weight: {{ control.weight }}</span>
|
||||
</div>
|
||||
{% endfor %}
|
||||
</div>
|
||||
</div>
|
||||
{% endfor %}
|
||||
|
||||
Reference in New Issue
Block a user