fnp
/
wolnelektury.git
/ blobdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
|
commitdiff
|
tree
raw
|
inline
| side by side
meta helper
[wolnelektury.git]
/
apps
/
funding
/
models.py
diff --git
a/apps/funding/models.py
b/apps/funding/models.py
index
3a74238
..
0bd5360
100644
(file)
--- a/
apps/funding/models.py
+++ b/
apps/funding/models.py
@@
-124,6
+124,9
@@
class Offer(models.Model):
""" QuerySet for all completed payments for the offer. """
return Funding.payed().filter(offer=self)
""" 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
def sum(self):
""" The money gathered. """
return self.funding_payed().aggregate(s=models.Sum('amount'))['s'] or 0