Added Flake8 lib and fixed PEP8 violations

This commit is contained in:
Siarhei Puhach 2017-06-29 17:34:40 +03:00
commit edcfd3e9f4
65 changed files with 340 additions and 387 deletions

View file

@ -3,6 +3,7 @@ from django.conf import settings
import stripe
stripe.api_key = settings.STRIPE_API_PRIVATE_KEY
class Command(BaseCommand):
help = "Record payment plans for Digital Glarus on stripe"
@ -10,5 +11,3 @@ class Command(BaseCommand):
print("Available plans:")
for plan in stripe.Plan.all():
print(plan)

View file

@ -11,11 +11,11 @@ PAYMENT_PLANS = [
'id': "spontaneus"
}),
('committed', {
'amount':36000,
'interval':'year',
'name':'The Committed',
'currency':'chf',
'id':'committed'
'amount': 36000,
'interval': 'year',
'name': 'The Committed',
'currency': 'chf',
'id': 'committed'
})
]
@ -26,8 +26,6 @@ class Command(BaseCommand):
def handle(self, *args, **options):
for payment_plan, data in PAYMENT_PLANS:
try:
res = stripe.Plan.create(**data)
stripe.Plan.create(**data)
except stripe.InvalidRequestError as e:
print(e)