django-plans changelog
======================

1.1.0
------------------
* Add `AbstractRecurringUserPlan.renewal_triggered_by`
* Use `AbstractRecurringUserPlan.renewal_triggered_by` instead of `has_automatic_renewal`; `has_automatic_renewal` is not used anywhere anymore; `has_automatic_renewal=True` is automatically migrated to `renewal_triggered_by=TASK` and `has_automatic_renewal=False` to `renewal_triggered_by=USER`
* Rename `AbstractRecurringUserPlan.has_automatic_renewal` to `_has_automatic_renewal_backup_deprecated` so it can be used make your own data migration from the former `has_automatic_renewal` to `renewal_triggered_by` if the default one does not work for you
* Add `AbstractRecurringUserPlan.has_automatic_renewal` property that issues a deprecation warning and uses `renewal_triggered_by` under the hood
* Add `renewal_triggered_by` parameter to `AbstractUserPlan.set_plan_renewal`
* Deprecate `AbstractRecurringUserPlan.has_automatic_renewal`; use `AbstractRecurringUserPlan.renewal_triggered_by` instead
* Deprecate `AbstractRecurringUserPlan._has_automatic_renewal_backup_deprecated`; use `AbstractRecurringUserPlan.renewal_triggered_by` instead
* Deprecate `has_automatic_renewal` parameter of `AbstractUserPlan.set_plan_renewal`; use `renewal_triggered_by` instead
* Deprecate `None` value of `renewal_triggered_by` parameter of `AbstractUserPlan.set_plan_renewal`; use an `AbstractRecurringUserPlan.RENEWAL_TRIGGERED_BY` instead

1.0.7
------------------
* Add `AbstractOrder.return_order()`

1.0.6
-----
* Simplify the query generated by get_initial_number

1.0.5
-----
* Re-use old RecurringUserPlan in set_plan_renewal() to retain ID and history
* `autorenew_accounts` management command: better output, --providers option
* Blackify whole source

1.0.3
-----
* Prevent duplicated invoice creation when concurrent Order.complete_order() are callled
* Test in Python 3.11

1.0.2
-----
* Accidentaly same as 1.0.1

1.0.1
-----
* Handle SAXParseException when fetching VAT ID

1.0.0
-----
* Transform BillingInfo create and update view into one BillingInfoCreateOrUpdateView. This will require implementors to change these views if they were overriden. Also if one of the `billing_info_create.html` or `billing_info_update.html` templates has been overriden, he has to transform the code into the new `billing_info_create_or_update.html` template.
* Celery dependency was removed. Now the implementor has to connect the `plans.tasks.autorenew_account` `plans.tasks.expire_account` tasks by himself or use management command.
* Disable particular e-mails from system through configuration: `PLANS_SEND_EMAILS_NO_SEND_TYPES`, `PLANS_SEND_EMAILS_PLAN_CHANGED`, `PLANS_SEND_EMAILS_PLAN_EXTENDED`
* If e-mail template with `.html` appendix, send HTML e-mail.
* Add basic recurring payments support
* Added `expire_accounts` management command as an alternative to Celery task
* Added free plan support, fix expired quotas.
* It is now ensured, that we have only one default migration.
* Use parameters to compose error messages in validators.
* Fix problem with changed `AUTH_USER_MODEL` and user link in `PlanAdmin`.
* Determine country by IP address in billing info, if geolite2 is installed
* Added possibility to define `PLANS_VALIDATORS` as lazy imported string.
* Supporting Django 2.1
* The range when the plan was extended is now stored in `Order.plan_extended_from` and `Order.plan_extended_until`.
* The fron/until extension range is shown to the user during order confirmation
* UserPlans are now automatically created with initial migration or with `create_userplans` adminaction.
* Added possibility to define `PLANS_APP_VERBOSE_NAME` to personalize plans' `verbose_name`
* Return back to order after setting up billing info

0.8.13
------
* Supporting Django 2.0.6.
1.1.0 (unreleased)
* New VAT standard rates 2017
* Remove dependency on `django.contrib.sites`.
* Feature #53: Cleaner and more explicit exception handling on `Plan.get_default_plan `.
* Feature #59: Adding code coverage to code base.
* Support customised user models by using `django.contrib.auth.get_user_model()`.
* Add Database migrations.


0.7
---
* Changes in plans.taxation.eu.EUTaxationPolicy to implement new EU VAT regulations (MOSS)
* Clean up settings variables naming conventions prepending PLANS_ prefix:
  * Renamed settings variable name TAXATION_POLICY to PLANS_TAXATION_POLICY
  * Renamed settings variable name ISSUER_DATA to PLANS_INVOICE_ISSUER
  * Renamed settings variable name PLAN_EXPIRATION_REMIND to PLANS_EXPIRATION_REMIND
  * Renamed settings variable name PLAN_CHANGE_POLICY to PLANS_CHANGE_POLICY
  * Renamed settings variable name PLAN_VALIDATORS to PLANS_VALIDATORS
  * Renamed settings variable name CURRENCY to PLANS_CURRENCY
  * Renamed settings variable name TAX to PLANS_TAX
  * Renamed settings variable name TAX_COUNTRY to PLANS_TAX_COUNTRY
  * Renamed settings variable name INVOICE_LOGO_URL to PLANS_INVOICE_LOGO_URL
  * Renamed settings variable name INVOICE_NUMBER_FORMAT to PLANS_INVOICE_NUMBER_FORMAT
  * Renamed settings variable name INVOICE_TEMPLATE to PLANS_INVOICE_TEMPLATE
  * Renamed settings variable name INVOICE_COUNTER_RESET to PLANS_INVOICE_COUNTER_RESET
  * Renamed settings variable name ORDER_EXPIRATION to PLANS_ORDER_EXPIRATION
  * Renamed settings variable name PLAN_DEFAULT_GRACE_PERIOD to PLANS_DEFAULT_GRACE_PERIOD



0.6+
----
* Changing `QuotaValidator` API. `ModelCountValidator` requires now to give `add` argument only as a kwarg.
* Adding support for defining URL for plan, quota and pricing period that will act as a clickable pricing
  table header (requires schema migration)
* Rename settings variable PLAN_ACTIVATION_VALIDATORS to PLAN_VALIDATORS
* Major refactoring of Validators API providing new feature - required_to_activate False/True for validators
* updating dependency to django-countries>=2.0 (fixes #29)
* support for django1.6 (fixes #28)
* complete demo application using Boostrap v3 for cool look
* adding missing default templates
* refactored login_required decorator usage (issue #20)
* taxation policies are moved from locale directory (issue #13) warning: backward incompatible!
* dependencies (apart from suds) are reviewed and refactored in setup.py (issue #9)

v.0.5 - v0.6
------------

[...] (FIXME: write history changelog from git commits

v.0.4
-----

* Migrating to django-countries. Requires schema migration.

v.0.3
-----

* Change plan policy - custom action how to billing change plan (downgrade/upgrade) can be implemented
* Taxation policy - custom action how to calculate tax can be implemented
* Dropping south migrations, it should be managed now as a project dependent migrations via SOUTH_MIGRATION_MODULES

v. 0.1.1
--------

* Added field default to Plans model - it means that this plan is supposed to be added to every new user. Via south migration 0002
* Added South migrations
