Private
Public Access
1
0

Merge branch 'develop' into feature/restapi

This commit is contained in:
Sander Roosendaal
2016-12-16 14:09:52 +01:00
5 changed files with 214 additions and 6 deletions

View File

@@ -50,6 +50,8 @@ from rowers.tasks import handle_sendemail_unrecognized
from scipy.signal import savgol_filter
from django.shortcuts import render_to_response
from shutil import copyfile
from rowingdata import rower as rrower
from rowingdata import main as rmain
from rowingdata import rowingdata as rrdata
@@ -240,6 +242,17 @@ def rower_register_view(request):
therower.save()
# Create Sample workout
f = 'media/testdata.csv.gz'
timestr = strftime("%Y%m%d-%H%M%S")
f2 = f[:-7]+timestr+'.csv.gz'
copyfile(f,f2)
response = dataprep.new_workout_from_file(therower,f2,
title='New User Sample Data',
notes='This is an example workout to get you started')
# 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.\n"