Private
Public Access
1
0

adding trailing slashes to post forms

This commit is contained in:
Sander Roosendaal
2019-01-05 13:29:39 +01:00
parent aa1b233798
commit e2cdb0af8e
25 changed files with 59 additions and 47 deletions

View File

@@ -10,30 +10,30 @@ def planstopaypal():
plan.external_id = None
plan.save()
def initiaterowerplans():
rowers = Rower.objects.filter(paymenttype = 'recurring',paidplan = None)
for r in rowers:
r.paymentprocessor = 'paypal'
r.save()
#def initiaterowerplans():
# rowers = Rower.objects.filter(paymenttype = 'recurring',paidplan = None)
# for r in rowers:
# r.paymentprocessor = 'paypal'
# r.save()
def setrowerplans():
rowers = Rower.objects.all()
#def setrowerplans():
# rowers = Rower.objects.all()
for r in rowers:
paidplans = PaidPlan.objects.filter(
shortname = r.rowerplan,
paymenttype = r.paymenttype,
clubsize = r.clubsize,
paymentprocessor=r.paymentprocessor)
# for r in rowers:
# paidplans = PaidPlan.objects.filter(
# shortname = r.rowerplan,
# paymenttype = r.paymenttype,
# clubsize = r.clubsize,
# paymentprocessor=r.paymentprocessor)
if paidplans:
r.paidplan = paidplans[0]
r.save()
else:
try:
print 'Could not set plan for ',r.user.username
except:
pass
# if paidplans:
# r.paidplan = paidplans[0]
# r.save()
# else:
# try:
# print 'Could not set plan for ',r.user.username
# except:
# pass
def is_existing_customer(rower):
if rower.country is not None and rower.customer_id is not None and rower.country != '':