diff --git a/djstripe/migrations/__init__.py b/djstripe/migrations/__init__.py index 79497f0423..8b13789179 100644 --- a/djstripe/migrations/__init__.py +++ b/djstripe/migrations/__init__.py @@ -1,18 +1 @@ -""" -Migrations have been built for Django=>1.7 versions. Alternative migrations -for Django<1.7 users are provided with the ``south_migrations`` dir. -""" - -SOUTH_ERROR_MESSAGE = """\n -For South support, customize the SOUTH_MIGRATION_MODULES setting like so: - SOUTH_MIGRATION_MODULES = { - 'djstripe': 'djstripe.south_migrations', - } -""" - -try: - from django.db import migrations # noqa -except ImportError: - from django.core.exceptions import ImproperlyConfigured - raise ImproperlyConfigured(SOUTH_ERROR_MESSAGE) diff --git a/djstripe/settings.py b/djstripe/settings.py index 8aaf8086a7..c6573737bd 100644 --- a/djstripe/settings.py +++ b/djstripe/settings.py @@ -8,16 +8,12 @@ """ from __future__ import unicode_literals -import sys - from django.apps import apps as django_apps from django.conf import settings from django.core.exceptions import ImproperlyConfigured from django.utils import six from django.utils.module_loading import import_string -PY3 = sys.version > "3" - def get_callback_function(setting_name, default=None): """ @@ -58,19 +54,11 @@ def get_callback_function(setting_name, default=None): PAYMENTS_PLANS = getattr(settings, "DJSTRIPE_PLANS", {}) PLAN_HIERARCHY = getattr(settings, "DJSTRIPE_PLAN_HIERARCHY", {}) -PASSWORD_INPUT_RENDER_VALUE = getattr(settings, 'DJSTRIPE_PASSWORD_INPUT_RENDER_VALUE', False) -PASSWORD_MIN_LENGTH = getattr(settings, 'DJSTRIPE_PASSWORD_MIN_LENGTH', 6) - PRORATION_POLICY = getattr(settings, 'DJSTRIPE_PRORATION_POLICY', False) PRORATION_POLICY_FOR_UPGRADES = getattr(settings, 'DJSTRIPE_PRORATION_POLICY_FOR_UPGRADES', False) CANCELLATION_AT_PERIOD_END = not getattr(settings, 'DJSTRIPE_PRORATION_POLICY', False) SEND_INVOICE_RECEIPT_EMAILS = getattr(settings, "DJSTRIPE_SEND_INVOICE_RECEIPT_EMAILS", True) -CURRENCIES = getattr(settings, "DJSTRIPE_CURRENCIES", ( - ('usd', 'U.S. Dollars',), - ('gbp', 'Pounds (GBP)',), - ('eur', 'Euros',)) -) DEFAULT_PLAN = getattr(settings, "DJSTRIPE_DEFAULT_PLAN", None) diff --git a/djstripe/templatetags/djstripe_tags.py b/djstripe/templatetags/djstripe_tags.py index eb28ab0850..d747fdce81 100644 --- a/djstripe/templatetags/djstripe_tags.py +++ b/djstripe/templatetags/djstripe_tags.py @@ -14,7 +14,7 @@ register = Library() -@register.filter +@register.filter(is_safe=False) def djdiv(value, arg): """ Divide the value by the arg, using Python 3-style division that returns floats. @@ -30,9 +30,6 @@ def djdiv(value, arg): return '' -division.is_safe = False - - @register.filter(name='djstripe_plan_level') def djstripe_plan_level(name): """ diff --git a/djstripe/views.py b/djstripe/views.py index b814e0863f..ee0799beb9 100644 --- a/djstripe/views.py +++ b/djstripe/views.py @@ -37,7 +37,7 @@ # ============================================================================ # -class AccountView(LoginRequiredMixin, SelectRelatedMixin, SubscriptionMixin, PaymentsContextMixin, TemplateView): +class AccountView(LoginRequiredMixin, SubscriptionMixin, PaymentsContextMixin, TemplateView): """Shows account details including customer and subscription details.""" template_name = "djstripe/account.html" diff --git a/docs/settings.rst b/docs/settings.rst index 22e5d2497c..c268792261 100644 --- a/docs/settings.rst +++ b/docs/settings.rst @@ -5,7 +5,7 @@ Settings DJSTRIPE_DEFAULT_PLAN (=None) ============================= -Payment plans default. +Payment plans default. Possibly deprecated in favor of model based plans. @@ -17,7 +17,7 @@ Invoice emails come from this address. DJSTRIPE_PLANS (={}) ==================== -Payment plans. +Payment plans. Possibly deprecated in favor of model based plans. @@ -60,7 +60,7 @@ Example: DJSTRIPE_PLAN_HIERARCHY (={}) ============================= -Payment plans levels. +Payment plans levels. Allows you to set levels of access to the plans. @@ -130,11 +130,11 @@ Example: {% elif customer.subscription|djstripe_plan_level > plan.plan|djstripe_plan_level %}