- Subscriptions in
SUSPENDED
state can now berenewed()
which solves an issue with payment callbacks correctly identifying a payment success.
- Introduced a boolean setting
SUBSCRIPTIONS_STUCK_RETRY
, defaulting toFalse
, that will cause stuck subscriptions to be marked asrenewal_failed
rather thanstate_unknown
.
- Dropped support for Django < 2.2
- Dropped support for Python 2
- Made dependencies >= rather than ^ to support a greater range
- Changed the log messages generated by the celery tasks
- Added the pk of the subscription to the str/repr to aid debugging
- Transition methods that received a
reason
argument now accept adescription
argument, which is stored on the state log, so that reasons aren't lost. Reason is still valid, but will not be persisted to the state log. Migrate to usingdescription
, and it will log in the state log AND thereason
field.state_unknown
,renewal_failed
,end_subscription
are affected.
- SubscriptionState.choices is now sorted, so that the order is consistent between python versions, and migrations are not generated by applications.
- Breaking Change
suspended_timeout
now triggers for subscriptions in SUSPENDED state that aretimeout_hours
past thesubscription.end
time. It used to trigger ifsubscription.last_updated
hadn't changed fortimeout_hours
, but iftrigger_suspended
was running daily, the subscription was constantly being updated, andtrigger_suspended_timeout
would never find a record toend()
.
- Only localise datetimes to dates when they are aware
- Display start/end dates in the local timezone
- Changed the display of Subscription.str
- Renewed can now be called from Active state, for an early renewal.
- Added a new trigger for renewing subscriptions in SUSPENDED state, which helps for retries
- Changed
timeout_days
totimeout_hours
insuspended_timeout
.timeout_hours
is still around for backward compatibility
- Generated missing migration file
- Added a migrate.py helper for generating migrations
- Updated version dependencies to (hopefully) make this installable under py2.7
- Initial working release
- Subscription models, tasks, and signals defined