working
This commit is contained in:
@@ -24,7 +24,7 @@ from rowers.tasks import (
|
||||
handle_send_email_subscription_update,
|
||||
handle_send_email_subscription_create,
|
||||
handle_send_email_failed_cancel,
|
||||
handle_send_email_transaction_notification,
|
||||
#handle_send_email_transaction_notification,
|
||||
)
|
||||
|
||||
import pandas as pd
|
||||
|
||||
@@ -1343,15 +1343,15 @@ def handle_send_email_transaction(
|
||||
return 1
|
||||
|
||||
@app.task
|
||||
def handle_send_email_transaction_notification(
|
||||
username, useremail, amount, additional_text, **kwargs):
|
||||
def handle_send_email_instantplan_notification(
|
||||
username, useremail, amount, planname,startdate, enddate, **kwargs):
|
||||
|
||||
if 'debug' in kwargs: # pragma: no cover
|
||||
debug = kwargs['debug']
|
||||
else:
|
||||
debug = True
|
||||
|
||||
subject = "Rowsandall Payment Confirmation"
|
||||
subject = "Rowsandall Instant Plan Notification"
|
||||
|
||||
from_email = 'Rowsandall <admin@rowsandall.com>'
|
||||
|
||||
@@ -1359,10 +1359,12 @@ def handle_send_email_transaction_notification(
|
||||
'name': username,
|
||||
'siteurl': siteurl,
|
||||
'amount': amount,
|
||||
'reason':additional_text,
|
||||
'planname': planname,
|
||||
'startdate':startdate,
|
||||
'enddate':enddate,
|
||||
}
|
||||
|
||||
res = send_template_email(from_email,['support@rowsandall.com'],
|
||||
res = send_template_email(from_email,['roosendaalsander@gmail.com'],
|
||||
subject,
|
||||
'instantplansold.html',
|
||||
d, **kwargs)
|
||||
|
||||
@@ -4,11 +4,11 @@
|
||||
<p>User <strong>{{ name }}</strong> made a payment.</p>
|
||||
|
||||
<p>
|
||||
{{ additional_text }}
|
||||
Plan: {{ planname }}, starting on {{ startdate }} and ending on {{ enddate }}
|
||||
</p>
|
||||
|
||||
<p>
|
||||
Price: €{{ price }}.
|
||||
Price: €{{ amount }}.
|
||||
</p>
|
||||
|
||||
<p>
|
||||
|
||||
@@ -243,6 +243,15 @@ def purchase_checkouts_view(request):
|
||||
p.rowers.add(r)
|
||||
|
||||
create_sessions_from_json(plansteps,r,startdate,r.user)
|
||||
print('aap')
|
||||
job = myqueue(queuehigh,handle_send_email_instantplan_notification,
|
||||
r.user.username,
|
||||
r.user.email,
|
||||
plan.price,
|
||||
plan.name,
|
||||
startdate,
|
||||
enddate)
|
||||
print(job,'noot')
|
||||
|
||||
url = reverse('plannedsessions_view')
|
||||
timeperiod = startdate.strftime('%Y-%m-%d')+'/'+enddate.strftime('%Y-%m-%d')
|
||||
|
||||
@@ -221,6 +221,7 @@ from rowers.tasks import (
|
||||
handle_sendemail_optout,
|
||||
handle_sendemail_ical,
|
||||
handle_c2_async_workout,
|
||||
handle_send_email_instantplan_notification,
|
||||
)
|
||||
|
||||
from scipy.signal import savgol_filter
|
||||
|
||||
Reference in New Issue
Block a user