Commit graph

14 commits

Author SHA1 Message Date
Brett Smith
8cffed1c68 donors2csv: Check for import errors as early as possible.
This has to be done before argument parsing because that uses
import2ledger.strparse.
2018-06-01 11:13:21 -04:00
Brett Smith
2e2c783657 python: Add donors2csv script. 2018-05-31 16:19:50 -04:00
Denver Gingerich
4d3b8b0673 models: flexible returning supporter mth count API
Rename months_expired() to months_expired_at_return() and have the
method return an integer representing the month count rather than an
enum-like so that the API user has more flexibility with respect to
what they then do with the result.  Thanks to Brett for the review
that suggested this, and for much of the clever math in this change.

The results produced by returning_report.py (which is updated here to
use the new API) are almost identical to the results produced before
the change.  In rare cases (about 2-5% of the time) a supporter's
lapsed month count will fall into an adjacent bucket instead of the
one it fell into before, usually because the previous result was wrong
to begin with (due to the ugly days-per-3-months table that we used
previously, which this change thankfully eliminates).
2018-01-25 17:03:09 -05:00
Denver Gingerich
6ab6441e14 python: report front-end for returning supporters
A reporting script similar to status_report.py that uses the new
returning supporter method (added in 7aaba96) to provide a list of
how many supporters have started supporting again after lapsing,
bucketed by the number of months for which they had been lapsed.
2018-01-25 17:03:09 -05:00
Denver Gingerich
0d3d9db4ed models: add months returning supporter had lapsed
A new public method, months_expired(), which is similar to the
existing status() in layout, but instead of returning whether the
supporter is new/active/lapsed/etc., it checks to see whether the
supporter is returning after having been lapsed, and if so, returns
the month range corresponding to how long they had been lapsed before
returning as a supporter in the current month.
2018-01-25 17:03:09 -05:00
Brett Smith
5b43b6d3f3 README: Update database migration method for Django 1.10. 2018-01-22 10:15:30 -05:00
Brett Smith
271f7a8c5b models: Update DateField to use Django 1.10 method. 2018-01-22 10:15:30 -05:00
Brett Smith
2b1bdb073d python models: Implement Supporter.supperter_type() with filters. 2017-02-17 15:24:40 -05:00
Brett Smith
8481bbf3b9 python models: Supporter.supporter_type() handles untagged payments. 2017-02-17 15:11:32 -05:00
Brett Smith
e2eab732ac python models: Add Date.strptime constructor. 2017-02-17 11:41:39 -05:00
Brett Smith
3751fe870f python: Initial documentation. 2017-01-25 15:35:10 -05:00
Brett Smith
8eb1854b8b python: Add status_report script. 2017-01-25 11:08:21 -05:00
Brett Smith
bc21b83951 python: Add Supporter pseudo-model. 2017-01-25 08:58:54 -05:00
Brett Smith
b32e72b1e8 python: Start Django project.
This is enough code to load Ledger data into Django models.
2017-01-24 13:31:30 -05:00