Private
Public Access
1
0

registration email from template

This commit is contained in:
Sander Roosendaal
2018-03-20 18:44:33 +01:00
parent 05f44f6547
commit 639473e2f8
3 changed files with 67 additions and 17 deletions

View File

@@ -303,7 +303,10 @@ def handle_stravaexport(f2,workoutname,stravatoken,description='',
# w = Workout.objects.get(id=workoutid)
client = stravalib.Client(access_token=stravatoken)
act = client.upload_activity(f2,'tcx.gz',name=workoutname)
try:
act = client.upload_activity(f2,'tcx.gz',name=workoutname)
except:
return {0,'Strava upload failed'}
try:
res = act.wait(poll_interval=5.0,timeout=30)
message = 'Workout successfully synchronized to Strava'

View File

@@ -0,0 +1,55 @@
{% extends "emailbase.html" %}
{% block body %}
<p>Dear <strong>{{ first_name }}</strong>,</p>
<p>
Thank you for registering on rowsandall.com.
You can now login using the credentials you provided.
The first thing you should do is go to the
<a href="https://rowsandall.com/rowers/me/edit/">Settings page</a>
and make yourself familiar with the various options
available to personalize your experience on the website.
To get there, use the link in the email or click the button
with your first name on it in the upper right corner of the opening page.
</p>
<p>
As a minimum to get you started, enter your data in the
Heart Rate Zones and Power Zones sections and your
Functional Threshold Power.
Then check your Account Information to make sure it is
accurate and reflects your preferences.
</p>
<p>
For additional details on these settings and
the buttons at the bottom of the page, read
the settings tutorial at
<a href="http://analytics.rowsandall.com/2017/11/02/rowsandall-settings-page-tutorial/">http://analytics.rowsandall.com/2017/11/02/rowsandall-settings-page-tutorial/</a>.
<p>
<p>
Also check out our instructional videos at
<a href="http://rowsandall.com/rowers/videos">http://rowsandall.com/rowers/videos</a>
</p>
<p>
This website is a labor of love "by rowers, for rowers".
If you find it to be useful, please help us cover
our hosting costs and gain access to additional functionality
by signing on as a Pro member:
<a href="https://rowsandall.com/rowers/promembership">https://rowsandall.com/rowers/promembership</a>
</p>
<p>
Oh, one more thing. The site is currently in beta and is
developing fast. Bear with us. Don't hesitate to
contact me at info@rowsandall.com if anything is broken
or doesn't seem to work as advertised.
</p>
<p>
Best Regards, the Rowsandall Team
</p>
{% endblock %}

View File

@@ -141,6 +141,8 @@ import pandas as pd
import numpy as np
import matplotlib.pyplot as plt
from rowers.emails import send_template_email
from pytz import timezone as tz,utc
import dateutil
import mpld3
@@ -954,23 +956,13 @@ def rower_register_view(request):
# Create and send email
fullemail = first_name + " " + last_name + " " + "<" + email + ">"
subject = "Thank you for registering on rowsandall.com"
message = """
Thank you for registering on rowsandall.com. You can now login using the credentials you provided. The first thing you should do is go to the Settings page and make yourself familiar with the various options available to personalize your experience on the website. To get there, click the button with your first name on it in the upper right corner of the opening page.
from_address = 'Sander Roosendaal <info@rowsandall.com>'
As a minimum to get you started, enter your data in the Heart Rate Zones and Power Zones sections and your Functional Threshold Power. Then check your Account Information to make sure it is accurate and reflects your preferences.
For additional details on these settings and the buttons at the bottom of the page, read the settings tutorial at http://analytics.rowsandall.com/2017/11/02/rowsandall-settings-page-tutorial/.
Also check out our instructional videos at http://rowsandall.com/rowers/videos.
This website is a labor of love "by rowers, for rowers". If you find it to be useful, please help us cover our hosting costs and gain access to additional functionality by signing on as a Pro member: https://rowsandall.com/rowers/promembership
Oh, one more thing. The site is currently in beta and is developing fast. Bear with us. Don't hesitate to contact me at info@rowsandall.com if anything is broken or doesn't seem to work as advertised.
"""
send_mail(subject, message,
'Sander Roosendaal <info@rowsandall.com>',
[fullemail])
d = {'first_name':theuser.first_name}
send_template_email(from_address,[fullemail],
subject,'registeremail.html',d)
subject2 = "New User"
message2 = "New user registered.\n"