Configuration¶
There are several options for Zebra. To override any of these options simply
add them to your settings.py with the value your desire.
-
zebra.config.options.STRIPE_PUBLISHABLE¶ - default:
''
Required to use the Stripe API.
Your Stripe API publishable key.
-
zebra.config.options.STRIPE_SECRET¶ - default:
''
Required to use the Stripe API.
Your Stripe API secret key.
-
zebra.config.options.ZEBRA_AUDIT_RESULTS¶ default
{ 'active': 'active', 'no_subscription': 'no_subscription', 'past_due': 'past_due', 'suspended': 'suspended', 'trialing': 'trialing', 'unpaid': 'unpaid', 'cancelled': 'cancelled' }
Dictionary in which the keys are possible responses from Stripe when checking the status of a subscription. Values are returned when the key matches the subscription status returned from Stripe.
-
zebra.config.options.ZEBRA_AUTO_CREATE_STRIPE_CUSTOMERS¶ - default:
True
Defaults to
Truebut is only applicable ifZEBRA_ENABLE_APPisTrue.Boolean to control whether accessing
stripe_customeronZEBRA_CUSTOMER_MODELautomatically creates a stripe customer if one doesn’t exist for the instance.
-
zebra.config.options.ZEBRA_CARD_YEARS¶ - default:
range(_today.year, _today.year+12)
List of years used to populate
ZEBRA_CARD_YEARS_CHOICES.
-
zebra.config.options.ZEBRA_CARD_YEARS_CHOICES¶ - default:
[(i,i) for i in ZEBRA_CARD_YEARS]
List of pairs (Django choices format) to be used in the credit card year field in
StripePaymentForm.
-
zebra.config.options.ZEBRA_CUSTOMER_MODEL¶ - default:
None
If
ZEBRA_ENABLE_APPisTruethen the default value iszebra.Customer
-
zebra.config.options.ZEBRA_ENABLE_APP¶ - default:
False
Boolean that enables the default models and admin that comes with zebra. Not to be confused with
marty.
-
zebra.config.options.ZEBRA_MAXIMUM_STRIPE_CUSTOMER_LIST_SIZE¶ - default:
100
Number of customers to return from querying Stripe when running the managment command to delete test users.
-
zebra.config.options.ZEBRA_ACTIVE_STATUSES¶ - default:
('active', 'past_due', 'trialing')
Iterable of strings that should be considered active based on the values in
ZEBRA_AUDIT_RESULTS.
-
zebra.config.options.ZEBRA_INACTIVE_STATUSES¶ - default:
('cancelled', 'suspended', 'unpaid', 'no_subscription')
Iterable of strings that should be considered inactive based on the values in
ZEBRA_AUDIT_RESULTS.