django模板慢速渲染

时间:2020-10-18 20:35:23

标签: python django templates django-templates

我的SQL Querset:20.3毫秒内的109个查询集 但总渲染时间为3秒

          {% for fooo in degray %}
              {% for foo in data %}
                {% for foor in data_list %}
                  {% if fooo.id|cut:" " == foo.withdegrey_id|cut:" " and fooo|cut:" " == foor.name|cut:" " %}
                        <tr>
                        <td colspan="1" >{{ foo.percontage }} %</td>
                        <td colspan="1" > {{ foo.date }}  </td>
                        <td colspan="1"  >{{ foo.nomberhodor  }}</td>
                        <td colspan="1"  >{{ foo.nomberesteda  }}</td>
                        <td colspan="1">{{ foor.nomberetud__sum  }}</td>
                        <td colspan="1">{{ foor.name  }}</td>
                        </tr>
                    {% endif %}
           {% endfor %}
   {% endfor %}
{% endfor %}

正在模板中使用很多循环,条件是渲染速度慢??

0 个答案:

没有答案