""" QuerySet for all completed payments for the offer. """
return Funding.payed().filter(offer=self)
+ def funders(self):
+ return self.funding_payed().order_by('-amount', 'payed_at')
+
def sum(self):
""" The money gathered. """
return self.funding_payed().aggregate(s=models.Sum('amount'))['s'] or 0
<a id="generated-switch">↓ {% trans "fundings" %} ↓</a>
-<div id="generated" style="display:none; padding:1em; border: 1px solid #aaa;">
+<div id="generated" style="display:none; padding:1em; border: 1px solid #aaa;">{% spaceless %}
{% for funding in original.funders %}
{% if funding.name %}
- <dc:contributor.funding>{{ funding.name }}</dc:contributor.funding><br/>
+ <dc:contributor.funding xml:lang="pl" xmlns:dc="http://purl.org/dc/elements/1.1/">{{ funding.name }}</dc:contributor.funding><br/>
{% endif %}
{% endfor %}
-</div>
+{% endspaceless %}</div>
{{ block.super }}
{% endblock %}