mirror of
https://github.com/nottinghamtec/PyRIGS.git
synced 2026-01-17 05:22:16 +00:00
Much prefetch/select related optimisations
This commit is contained in:
@@ -21,7 +21,7 @@
|
||||
<th scope="col">Event</th>
|
||||
{# mmm hax #}
|
||||
{% if object_list.0 != None %}
|
||||
{% for field in fields %}
|
||||
{% for field in object_list.0.fields %}
|
||||
<th scope="col">{{ object_list.0|verbose_name:field|title }}</th>
|
||||
{% endfor %}
|
||||
{% endif %}
|
||||
@@ -33,7 +33,7 @@
|
||||
<tr class="{% if object.reviewed_by %}table-success{%endif%}">
|
||||
{# General #}
|
||||
<th scope="row"><a href="{% url 'event_detail' object.event.pk %}">{{ object.event }}</a></th>
|
||||
{% for field in fields %}
|
||||
{% for field in object_list.0.fields %}
|
||||
<td>{{ object|get_field:field }}</td>
|
||||
{% endfor %}
|
||||
{# Buttons #}
|
||||
|
||||
@@ -42,7 +42,7 @@
|
||||
<td>{{ invoice.event.start_date }}</td>
|
||||
<td>{{ invoice.invoice_date }}</td>
|
||||
<td>
|
||||
{{ invoice.balance|floatformat:2 }}
|
||||
£{{ invoice.balance|floatformat:2 }}
|
||||
{% if not invoice.event.internal %}
|
||||
<br />
|
||||
<span class="text-muted">{{ invoice.event.purchase_order }}</span>
|
||||
|
||||
@@ -53,7 +53,7 @@
|
||||
{% endif %}
|
||||
</td>
|
||||
<td>
|
||||
{{ event.sum_total|floatformat:2 }}
|
||||
£{{ event.sum_total|floatformat:2 }}
|
||||
<br />
|
||||
<span class="text-muted">{% if not event.internal %}{{ event.purchase_order }}{% endif %}</span>
|
||||
</td>
|
||||
|
||||
Reference in New Issue
Block a user