Reformat code

This commit is contained in:
PCoder 2018-09-23 13:26:48 +02:00
parent d23624c525
commit 7f3b916c58

View file

@ -792,8 +792,8 @@ class OrderConfirmationView(DetailView):
} }
email_data = { email_data = {
'subject': settings.DCL_TEXT + " Payment received from %s" % context[ 'subject': (settings.DCL_TEXT +
'email'], " Payment received from %s" % context['email']),
'from_email': settings.DCL_SUPPORT_FROM_ADDRESS, 'from_email': settings.DCL_SUPPORT_FROM_ADDRESS,
'to': ['info@ungleich.ch'], 'to': ['info@ungleich.ch'],
'body': "\n".join( 'body': "\n".join(
@ -804,18 +804,21 @@ class OrderConfirmationView(DetailView):
email_data = { email_data = {
'subject': (settings.DCL_TEXT + 'subject': (settings.DCL_TEXT +
" Payment received from %s" % context['email']), "Confirmation of your payment"),
'from_email': settings.DCL_SUPPORT_FROM_ADDRESS, 'from_email': settings.DCL_SUPPORT_FROM_ADDRESS,
'to': [user.get('email')], 'to': [user.get('email')],
'body': ("Hi {name},\n\n" 'body': ("Hi {name},\n\n"
"We just received a payment of {amount}{recurring} " "We just received a payment of CHF {amount} "
"from you. We will get back to you on this soon.\n\n" "from you. {recurring}.\n\n"
"Your DataCenterLight Team".format( "Your DataCenterLight Team".format(
name=user.get('name'), name=user.get('name'),
amount=gp_details['amount'], amount=gp_details['amount'],
recurring=gp_details['recurring'] recurring=(
) 'This is a monthly recurring plan.'
), if gp_details['recurring'] else ''
)
)
),
'reply_to': ['info@ungleich.ch'], 'reply_to': ['info@ungleich.ch'],
} }
send_plain_email_task.delay(email_data) send_plain_email_task.delay(email_data)
@ -836,7 +839,8 @@ class OrderConfirmationView(DetailView):
} }
for session_var in ['specs', 'template', 'billing_address', for session_var in ['specs', 'template', 'billing_address',
'billing_address_data', 'card_id', 'billing_address_data', 'card_id',
'token', 'customer', 'generic_payment_type', 'generic_payment_details']: 'token', 'customer', 'generic_payment_type',
'generic_payment_details']:
if session_var in request.session: if session_var in request.session:
del request.session[session_var] del request.session[session_var]