Conditions in template slows down the software
I have used many condition in my templates, in order to filter my
results. My template file uses this code :
{% for clients in client %}
{% for amounts in amount %}
{% for suspences in suspence %}
{% for tadas in tada %}
{% for transports in transport %}
{% if clients.job_no == amounts.job_no%}
{% if clients.job_no == suspences.job_no %}
{% if clients.job_no == tadas.job_no %}
{% if clients.job_no == transports.job_no %}
<tr>
<td>{{ clients.job_no}}</td>
<td> {{ clients.date }}</td>
<td> {{ clients.receipt_no }}</td>
<td> {{clients.name_and_address}}</td>
<td>{{amounts.field}}</td>
...........................
...........
This code slows down the system to a great extent. Please suggest me
an alternate and better solution.
--
Sandeep Kaur
E-Mail: mkaurkhalsa@gmail.com
Blog: sandymadaan.wordpress.com
--
You received this message because you are subscribed to the Google Groups "Django users" group.
To post to this group, send email to django-users@googlegroups.com.
To unsubscribe from this group, send email to django-users+unsubscribe@googlegroups.com.
For more options, visit this group at http://groups.google.com/group/django-users?hl=en.
0 Comments:
Post a Comment
Subscribe to Post Comments [Atom]
<< Home