Python 向django模板表中的特定行添加图标
我正在处理python Django模板,其中有一个表,其列为id、factor a、factor B、factor C。id、系数A、系数B和系数C的值分别为79、0.56、1.1和1.3 html模板的代码如下所示:Python 向django模板表中的特定行添加图标,python,css,django,icons,Python,Css,Django,Icons,我正在处理python Django模板,其中有一个表,其列为id、factor a、factor B、factor C。id、系数A、系数B和系数C的值分别为79、0.56、1.1和1.3 html模板的代码如下所示: <table class="table table-bordered"> <thead> <tr> <th class="text-center">id</th> <th c
<table class="table table-bordered">
<thead>
<tr>
<th class="text-center">id</th>
<th class="text-center">Factor A</th>
<th class="text-center">Factor B</th>
<th class="text-center">Factor C</th>
</tr>
</thead>
<tbody >
<tr ng-class="{'info':aggregateData.Mode, 'closed':!aggregateData.Open}">
<td class="text-center">{{aggregateData.id}}</td>
<td class="text-center">{{aggregateData.factor_a}}</td>
<td class="text-center">{{aggregateData.factor_b}}</td>
<td class="text-center">{{aggregateData.factor_c}}</td>
</tr>
</tbody>
</table
身份证件
因素A
因子B
因子C
{{aggregateData.id}
{{aggregateData.factor_a}}
{{aggregateData.factor_b}}
{{aggregateData.factor_c}}
试试这个
<table class="table table-bordered">
<thead>
<tr>
<th class="text-center">id</th>
<th class="text-center">Factor A</th>
<th class="text-center">Factor B</th>
<th class="text-center">Factor C</th>
</tr>
</thead>
<tbody >
<tr ng-class="{'info':aggregateData.Mode, 'closed':!aggregateData.Open}">
<td class="text-center">{{aggregateData.id}}</td>
<td class="text-center">{{aggregateData.factor_a}}</td>
<td class="text-center">{{aggregateData.factor_b}}</td>
<td class="text-center">{{aggregateData.factor_c}}</td>
{% if aggregateData.open == True %}
<td class="text-center">
<a href="https://www.google.co.in">
<img src="/path_toicon.png">
</a>
</td>
{% endif %}
</tr>
</tbody>
</table>
身份证件
因素A
因子B
因子C
{{aggregateData.id}
{{aggregateData.factor_a}}
{{aggregateData.factor_b}}
{{aggregateData.factor_c}}
{%if aggregateData.open==True%}
{%endif%}