You can not select more than 25 topics
Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.
10 lines
358 B
10 lines
358 B
from django.conf import settings
|
|
|
|
def stripe_context(request):
|
|
"""Add Stripe-related context variables to templates"""
|
|
stripe_mode = getattr(settings, 'STRIPE_MODE', 'test')
|
|
return {
|
|
'STRIPE_PUBLISHABLE_KEY': settings.STRIPE_PUBLISHABLE_KEY,
|
|
'STRIPE_MODE': stripe_mode,
|
|
'STRIPE_IS_TEST_MODE': stripe_mode == 'test',
|
|
}
|
|
|