implemented make_plot
This commit is contained in:
@@ -72,15 +72,24 @@ class Command(BaseCommand):
|
||||
]
|
||||
res += wid
|
||||
link = 'http://rowsandall.com/rowers/workout/'+str(wid[0])+'/edit'
|
||||
if uploadoptions and not 'error' in uploadoptions:
|
||||
w = Workout.objects.get(wid[0])
|
||||
r = w.user
|
||||
if 'make_plot' in uploadoptions:
|
||||
plottype = uploadoptions['plottype']
|
||||
res = uploads.make_plot(r,w,plottype,
|
||||
title,f2[6:],f2)
|
||||
try:
|
||||
if wid != 1:
|
||||
dd = send_confirm(rr.user,title,link)
|
||||
dd = send_confirm(rr.user,title,link,
|
||||
uploadoptions)
|
||||
time.sleep(10)
|
||||
except:
|
||||
try:
|
||||
time.sleep(10)
|
||||
if wid != 1:
|
||||
dd = send_confirm(rr.user,title,link)
|
||||
dd = send_confirm(rr.user,title,link,
|
||||
uploadoptions)
|
||||
except:
|
||||
pass
|
||||
|
||||
@@ -94,7 +103,14 @@ class Command(BaseCommand):
|
||||
]
|
||||
res += wid
|
||||
link = 'http://rowsandall.com/rowers/workout/'+str(wid[0])+'/edit'
|
||||
|
||||
if uploadoptions:
|
||||
w = Workout.objects.get(wid[0])
|
||||
r = w.user
|
||||
if 'make_plot' in uploadoptions:
|
||||
plottype = uploadoptions['plottype']
|
||||
res = uploads.make_plot(r,w,plottype,
|
||||
title,f2[6:],f2)
|
||||
|
||||
except:
|
||||
# replace with code to process error
|
||||
res += ['fail: '+name]
|
||||
@@ -102,7 +118,8 @@ class Command(BaseCommand):
|
||||
wid = 1
|
||||
try:
|
||||
if wid != 1:
|
||||
dd = send_confirm(rr.user,name,link)
|
||||
dd = send_confirm(rr.user,name,link,
|
||||
uploadoptions)
|
||||
time.sleep(10)
|
||||
except:
|
||||
pass
|
||||
|
||||
Reference in New Issue
Block a user