Merge branch 'release/v4.81'
This commit is contained in:
@@ -527,6 +527,7 @@ def fetchcp(rower,theworkouts,table='cpdata'):
|
|||||||
theids = [int(w.id) for w in theworkouts]
|
theids = [int(w.id) for w in theworkouts]
|
||||||
columns = ['power','workoutid','time']
|
columns = ['power','workoutid','time']
|
||||||
df = getsmallrowdata_db(columns,ids=theids)
|
df = getsmallrowdata_db(columns,ids=theids)
|
||||||
|
df.dropna(inplace=True,axis=0)
|
||||||
if df.empty:
|
if df.empty:
|
||||||
avgpower2 = {}
|
avgpower2 = {}
|
||||||
for id in theids:
|
for id in theids:
|
||||||
|
|||||||
@@ -164,6 +164,11 @@ nextpages = list(landingpages)
|
|||||||
nextpages.append(('workout_upload_view','Upload Another File'))
|
nextpages.append(('workout_upload_view','Upload Another File'))
|
||||||
nextpages = tuple(nextpages)
|
nextpages = tuple(nextpages)
|
||||||
|
|
||||||
|
class LandingPageForm(forms.Form):
|
||||||
|
landingpage = forms.ChoiceField(choices=nextpages,
|
||||||
|
initial='workout_edit_view',
|
||||||
|
label='After Upload, go to')
|
||||||
|
|
||||||
class UploadOptionsForm(forms.Form):
|
class UploadOptionsForm(forms.Form):
|
||||||
plotchoices = (
|
plotchoices = (
|
||||||
('timeplot','Time Plot'),
|
('timeplot','Time Plot'),
|
||||||
|
|||||||
+51
-8
@@ -16,7 +16,9 @@ from matplotlib.backends.backend_agg import FigureCanvas
|
|||||||
#from matplotlib.backends.backend_cairo import FigureCanvasCairo as FigureCanvas
|
#from matplotlib.backends.backend_cairo import FigureCanvasCairo as FigureCanvas
|
||||||
import matplotlib.pyplot as plt
|
import matplotlib.pyplot as plt
|
||||||
|
|
||||||
|
from rowsandall_app.settings import SITE_URL
|
||||||
|
from rowsandall_app.settings_dev import SITE_URL as SITE_URL_DEV
|
||||||
|
from rowsandall_app.settings import PROGRESS_CACHE_SECRET
|
||||||
|
|
||||||
import pandas as pd
|
import pandas as pd
|
||||||
|
|
||||||
@@ -296,11 +298,17 @@ def handle_sendemailtcx(first_name, last_name, email, tcxfile,debug=False):
|
|||||||
@app.task
|
@app.task
|
||||||
def handle_zip_file(emailfrom, subject, file,debug=False):
|
def handle_zip_file(emailfrom, subject, file,debug=False):
|
||||||
message = "... zip processing ... "
|
message = "... zip processing ... "
|
||||||
|
if debug:
|
||||||
|
print message
|
||||||
email = EmailMessage(subject, message,
|
email = EmailMessage(subject, message,
|
||||||
emailfrom,
|
emailfrom,
|
||||||
['workouts@rowsandall.com'])
|
['workouts@rowsandall.com'])
|
||||||
email.attach_file(file)
|
email.attach_file(file)
|
||||||
|
if debug:
|
||||||
|
print "attaching"
|
||||||
res = email.send()
|
res = email.send()
|
||||||
|
if debug:
|
||||||
|
print "sent"
|
||||||
time.sleep(60)
|
time.sleep(60)
|
||||||
return 1
|
return 1
|
||||||
|
|
||||||
@@ -338,12 +346,36 @@ def handle_sendemailcsv(first_name, last_name, email, csvfile,debug=False):
|
|||||||
# Calculate wind and stream corrections for OTW rowing
|
# Calculate wind and stream corrections for OTW rowing
|
||||||
|
|
||||||
|
|
||||||
@app.task
|
@app.task(bind=True)
|
||||||
def handle_otwsetpower(f1, boattype, weightvalue,
|
def handle_otwsetpower(self,f1, boattype, weightvalue,
|
||||||
first_name, last_name, email, workoutid, ps=[
|
first_name, last_name, email, workoutid,
|
||||||
1, 1, 1, 1],
|
**kwargs):
|
||||||
ratio=1.0,
|
# ps=[
|
||||||
debug=False):
|
# 1, 1, 1, 1],
|
||||||
|
# ratio=1.0,
|
||||||
|
# debug=False):
|
||||||
|
job = self.request
|
||||||
|
job_id = job.id
|
||||||
|
|
||||||
|
if 'jobkey' in kwargs:
|
||||||
|
job_id = kwargs.pop('jobkey')
|
||||||
|
if 'ps' in kwargs:
|
||||||
|
ps = kwargs['ps']
|
||||||
|
else:
|
||||||
|
ps = [1,1,1,1]
|
||||||
|
|
||||||
|
if 'ratio' in kwargs:
|
||||||
|
ratio = kwargs['ratio']
|
||||||
|
else:
|
||||||
|
ratio = 1.0
|
||||||
|
if 'debug' in kwargs:
|
||||||
|
debug = kwargs['debug']
|
||||||
|
else:
|
||||||
|
debug = False
|
||||||
|
|
||||||
|
kwargs['jobid'] = job_id
|
||||||
|
|
||||||
|
|
||||||
try:
|
try:
|
||||||
rowdata = rdata(f1)
|
rowdata = rdata(f1)
|
||||||
except IOError:
|
except IOError:
|
||||||
@@ -377,8 +409,19 @@ def handle_otwsetpower(f1, boattype, weightvalue,
|
|||||||
except KeyError:
|
except KeyError:
|
||||||
pass
|
pass
|
||||||
|
|
||||||
|
progressurl = SITE_URL
|
||||||
|
if debug:
|
||||||
|
progressurl = SITE_URL_DEV
|
||||||
|
secret = PROGRESS_CACHE_SECRET
|
||||||
|
|
||||||
|
progressurl += "/rowers/record-progress/"
|
||||||
|
progressurl += job_id
|
||||||
|
|
||||||
rowdata.otw_setpower_silent(skiprows=5, mc=weightvalue, rg=rg,
|
rowdata.otw_setpower_silent(skiprows=5, mc=weightvalue, rg=rg,
|
||||||
powermeasured=powermeasured)
|
powermeasured=powermeasured,
|
||||||
|
progressurl=progressurl,
|
||||||
|
secret=secret
|
||||||
|
)
|
||||||
|
|
||||||
# save data
|
# save data
|
||||||
rowdata.write_csv(f1, gzip=True)
|
rowdata.write_csv(f1, gzip=True)
|
||||||
|
|||||||
@@ -51,6 +51,11 @@
|
|||||||
</script>
|
</script>
|
||||||
{% endblock %}
|
{% endblock %}
|
||||||
|
|
||||||
|
{% block scripts %}
|
||||||
|
{% include "monitorjobs.html" %}
|
||||||
|
{% endblock %}
|
||||||
|
|
||||||
|
|
||||||
{% block content %}
|
{% block content %}
|
||||||
|
|
||||||
|
|
||||||
|
|||||||
@@ -4,6 +4,10 @@
|
|||||||
|
|
||||||
{% block title %}Rowsandall Recent Graphs{% endblock %}
|
{% block title %}Rowsandall Recent Graphs{% endblock %}
|
||||||
|
|
||||||
|
{% block scripts %}
|
||||||
|
{% include "monitorjobs.html" %}
|
||||||
|
{% endblock %}
|
||||||
|
|
||||||
{% block content %}
|
{% block content %}
|
||||||
<h1>Recent Graphs</h1>
|
<h1>Recent Graphs</h1>
|
||||||
|
|
||||||
|
|||||||
@@ -0,0 +1,30 @@
|
|||||||
|
<script type='text/javascript'
|
||||||
|
src='https://ajax.googleapis.com/ajax/libs/jquery/2.1.4/jquery.min.js'>
|
||||||
|
</script>
|
||||||
|
|
||||||
|
<script>
|
||||||
|
var previous = null;
|
||||||
|
var current = null;
|
||||||
|
var formNotChanged = true;
|
||||||
|
(function checkJobs() {
|
||||||
|
console.log('polling');
|
||||||
|
console.log(formNotChanged)
|
||||||
|
$.getJSON(window.location.protocol + '//'+window.location.host + '/rowers/list-jobs/', function(json) {
|
||||||
|
current = JSON.stringify(json);
|
||||||
|
$('form').each(function() {
|
||||||
|
$(this).change(function() {
|
||||||
|
formNotChanged = false;
|
||||||
|
console.log("Form Changed");
|
||||||
|
console.log(formNotChanged)
|
||||||
|
});
|
||||||
|
});
|
||||||
|
if (previous && current && previous !== current && formNotChanged) {
|
||||||
|
console.log('refresh');
|
||||||
|
location.reload();
|
||||||
|
};
|
||||||
|
previous = current;
|
||||||
|
});
|
||||||
|
setTimeout(checkJobs, 15000);
|
||||||
|
}());
|
||||||
|
|
||||||
|
</script>
|
||||||
@@ -2,6 +2,10 @@
|
|||||||
{% load staticfiles %}
|
{% load staticfiles %}
|
||||||
{% load rowerfilters %}
|
{% load rowerfilters %}
|
||||||
|
|
||||||
|
{% block scripts %}
|
||||||
|
{% include "monitorjobs.html" %}
|
||||||
|
{% endblock %}
|
||||||
|
|
||||||
{% block title %}Workouts{% endblock %}
|
{% block title %}Workouts{% endblock %}
|
||||||
|
|
||||||
{% block content %}
|
{% block content %}
|
||||||
|
|||||||
@@ -0,0 +1,6 @@
|
|||||||
|
<div class="grid_2 alpha">
|
||||||
|
<p>
|
||||||
|
<a class="button gray small" href="/rowers/workout/{{ workout.id }}/updatecp">
|
||||||
|
Make Ranking Piece</a>
|
||||||
|
</p>
|
||||||
|
</div>
|
||||||
@@ -3,6 +3,9 @@
|
|||||||
{% load rowerfilters %}
|
{% load rowerfilters %}
|
||||||
|
|
||||||
{% block title %}Workouts{% endblock %}
|
{% block title %}Workouts{% endblock %}
|
||||||
|
{% block scripts %}
|
||||||
|
{% include "monitorjobs.html" %}
|
||||||
|
{% endblock %}
|
||||||
|
|
||||||
{% block content %}
|
{% block content %}
|
||||||
|
|
||||||
|
|||||||
@@ -79,6 +79,10 @@
|
|||||||
<td>Four intervals of 6, 5, 3 and 3 minutes length, 3 minutes rest</td>
|
<td>Four intervals of 6, 5, 3 and 3 minutes length, 3 minutes rest</td>
|
||||||
</tr>
|
</tr>
|
||||||
<tr>
|
<tr>
|
||||||
|
<td>8x500m/3:30min </td>
|
||||||
|
<td>8 times 500m with 3 minutes 30 seconds rest</td>
|
||||||
|
</tr>
|
||||||
|
<tr>
|
||||||
<td>4x(500m+500m)/5min</td><td>4 times 1km, but each km is reported as two 500m intervals without rest</td>
|
<td>4x(500m+500m)/5min</td><td>4 times 1km, but each km is reported as two 500m intervals without rest</td>
|
||||||
</tr>
|
</tr>
|
||||||
<tr>
|
<tr>
|
||||||
|
|||||||
@@ -23,6 +23,11 @@
|
|||||||
{% endfor %}
|
{% endfor %}
|
||||||
{% endblock %}
|
{% endblock %}
|
||||||
|
|
||||||
|
{% block scripts %}
|
||||||
|
{% include "monitorjobs.html" %}
|
||||||
|
{% endblock %}
|
||||||
|
|
||||||
|
|
||||||
{% block content %}
|
{% block content %}
|
||||||
<div id="page" class="grid_12 alpha">
|
<div id="page" class="grid_12 alpha">
|
||||||
<div class="grid_10 prefix_2 alpha">
|
<div class="grid_10 prefix_2 alpha">
|
||||||
|
|||||||
@@ -3,6 +3,10 @@
|
|||||||
{% load rowerfilters %}
|
{% load rowerfilters %}
|
||||||
{% load tz %}
|
{% load tz %}
|
||||||
|
|
||||||
|
{% block scripts %}
|
||||||
|
{% include "monitorjobs.html" %}
|
||||||
|
{% endblock %}
|
||||||
|
|
||||||
{% block title %}Change Workout {% endblock %}
|
{% block title %}Change Workout {% endblock %}
|
||||||
|
|
||||||
{% block content %}
|
{% block content %}
|
||||||
|
|||||||
@@ -13,6 +13,13 @@
|
|||||||
{% block og_description %}{{ workout.name }}
|
{% block og_description %}{{ workout.name }}
|
||||||
{{ workout.date }} - {{ workout.distance }}m - {{ workout.duration |durationprint:"%H:%M:%S.%f" }}{% endblock %}
|
{{ workout.date }} - {{ workout.distance }}m - {{ workout.duration |durationprint:"%H:%M:%S.%f" }}{% endblock %}
|
||||||
|
|
||||||
|
{% block scripts %}
|
||||||
|
{% include "monitorjobs.html" %}
|
||||||
|
<script type='text/javascript'
|
||||||
|
src='https://ajax.googleapis.com/ajax/libs/jquery/2.1.4/jquery.min.js'>
|
||||||
|
</script>
|
||||||
|
{% endblock %}
|
||||||
|
|
||||||
{% block content %}
|
{% block content %}
|
||||||
<div id="workouts" class="grid_6 alpha">
|
<div id="workouts" class="grid_6 alpha">
|
||||||
|
|
||||||
@@ -89,8 +96,9 @@
|
|||||||
</tr>
|
</tr>
|
||||||
</table>
|
</table>
|
||||||
</div>
|
</div>
|
||||||
<div class="grid_6 alpha">
|
<div id="form-div" class="grid_6 alpha">
|
||||||
<form enctype="multipart/form-data" action="" method="post">
|
<form id="importantform"
|
||||||
|
enctype="multipart/form-data" action="" method="post">
|
||||||
<table width=100%>
|
<table width=100%>
|
||||||
{{ form.as_table }}
|
{{ form.as_table }}
|
||||||
</table>
|
</table>
|
||||||
|
|||||||
@@ -1,6 +1,9 @@
|
|||||||
{% extends "base.html" %}
|
{% extends "base.html" %}
|
||||||
{% load staticfiles %}
|
{% load staticfiles %}
|
||||||
{% load rowerfilters %}
|
{% load rowerfilters %}
|
||||||
|
{% block scripts %}
|
||||||
|
{% include "monitorjobs.html" %}
|
||||||
|
{% endblock %}
|
||||||
|
|
||||||
{% block title %}{{ workout.name }} {% endblock %}
|
{% block title %}{{ workout.name }} {% endblock %}
|
||||||
{% block og_title %}{{ workout.name }} {% endblock %}
|
{% block og_title %}{{ workout.name }} {% endblock %}
|
||||||
|
|||||||
@@ -144,6 +144,8 @@ urlpatterns = [
|
|||||||
url(r'^test-job/(?P<aantal>\d+)$',views.test_job_view),
|
url(r'^test-job/(?P<aantal>\d+)$',views.test_job_view),
|
||||||
url(r'^test-job2/(?P<aantal>\d+)$',views.test_job_view2),
|
url(r'^test-job2/(?P<aantal>\d+)$',views.test_job_view2),
|
||||||
url(r'^record-progress/(?P<value>\d+)/(?P<id>.*)$',views.post_progress),
|
url(r'^record-progress/(?P<value>\d+)/(?P<id>.*)$',views.post_progress),
|
||||||
|
url(r'^record-progress/(?P<id>.*)$',views.post_progress),
|
||||||
|
url(r'^record-progress$',views.post_progress),
|
||||||
url(r'^list-graphs/$',views.graphs_view),
|
url(r'^list-graphs/$',views.graphs_view),
|
||||||
url(r'^(?P<theuser>\d+)/ote-bests/(?P<startdatestring>\w+.*)/(?P<enddatestring>\w+.*)$',views.rankings_view),
|
url(r'^(?P<theuser>\d+)/ote-bests/(?P<startdatestring>\w+.*)/(?P<enddatestring>\w+.*)$',views.rankings_view),
|
||||||
url(r'^(?P<theuser>\d+)/ote-bests/(?P<deltadays>\d+)$',views.rankings_view),
|
url(r'^(?P<theuser>\d+)/ote-bests/(?P<deltadays>\d+)$',views.rankings_view),
|
||||||
|
|||||||
@@ -45,6 +45,7 @@ workflowleftpanel = (
|
|||||||
('panel_editstream.html','Edit Stream Data'),
|
('panel_editstream.html','Edit Stream Data'),
|
||||||
('panel_otwpower.html','Run OTW Power Calculations'),
|
('panel_otwpower.html','Run OTW Power Calculations'),
|
||||||
('panel_mapview.html','Map'),
|
('panel_mapview.html','Map'),
|
||||||
|
('panel_ranking.html','Ranking View'),
|
||||||
)
|
)
|
||||||
|
|
||||||
defaultleft = [
|
defaultleft = [
|
||||||
@@ -222,11 +223,17 @@ def isbreakthrough(delta,cpvalues,p0,p1,p2,p3,ratio):
|
|||||||
def myqueue(queue,function,*args,**kwargs):
|
def myqueue(queue,function,*args,**kwargs):
|
||||||
if settings.DEBUG:
|
if settings.DEBUG:
|
||||||
kwargs['debug'] = True
|
kwargs['debug'] = True
|
||||||
|
|
||||||
|
print 'myqueue'
|
||||||
|
print args
|
||||||
|
print kwargs
|
||||||
|
|
||||||
job = function.delay(*args,**kwargs)
|
job = function.delay(*args,**kwargs)
|
||||||
else:
|
else:
|
||||||
job_id = str(uuid.uuid4())
|
job_id = str(uuid.uuid4())
|
||||||
kwargs['job_id'] = job_id
|
kwargs['job_id'] = job_id
|
||||||
kwargs['jobkey'] = job_id
|
kwargs['jobkey'] = job_id
|
||||||
|
|
||||||
job = queue.enqueue(function,*args,**kwargs)
|
job = queue.enqueue(function,*args,**kwargs)
|
||||||
|
|
||||||
return job
|
return job
|
||||||
|
|||||||
+42
-18
@@ -27,6 +27,7 @@ from rowers.forms import (
|
|||||||
LoginForm,DocumentsForm,UploadOptionsForm,
|
LoginForm,DocumentsForm,UploadOptionsForm,
|
||||||
TeamUploadOptionsForm,WorkFlowLeftPanelForm,WorkFlowMiddlePanelForm,
|
TeamUploadOptionsForm,WorkFlowLeftPanelForm,WorkFlowMiddlePanelForm,
|
||||||
WorkFlowLeftPanelElement,WorkFlowMiddlePanelElement,
|
WorkFlowLeftPanelElement,WorkFlowMiddlePanelElement,
|
||||||
|
LandingPageForm,
|
||||||
)
|
)
|
||||||
from django.core.urlresolvers import reverse
|
from django.core.urlresolvers import reverse
|
||||||
from django.core.exceptions import PermissionDenied
|
from django.core.exceptions import PermissionDenied
|
||||||
@@ -194,9 +195,9 @@ redis_connection = StrictRedis()
|
|||||||
r = Redis()
|
r = Redis()
|
||||||
|
|
||||||
# this doesn't yet work on production
|
# this doesn't yet work on production
|
||||||
if settings.DEBUG:
|
#if settings.DEBUG:
|
||||||
client = SessionTaskListener(r,['tasks'])
|
# client = SessionTaskListener(r,['tasks'])
|
||||||
client.start()
|
# client.start()
|
||||||
|
|
||||||
|
|
||||||
rq_registry = StartedJobRegistry(queue.name,connection=redis_connection)
|
rq_registry = StartedJobRegistry(queue.name,connection=redis_connection)
|
||||||
@@ -367,19 +368,32 @@ def test_job_view2(request,aantal=100):
|
|||||||
@csrf_exempt
|
@csrf_exempt
|
||||||
def post_progress(request,id=None,value=0):
|
def post_progress(request,id=None,value=0):
|
||||||
if request.method == 'POST':
|
if request.method == 'POST':
|
||||||
secret = request.POST['secret']
|
try:
|
||||||
|
secret = request.POST['secret']
|
||||||
|
except KeyError:
|
||||||
|
return HttpResponse('Access Denied',status=401)
|
||||||
if secret == settings.PROGRESS_CACHE_SECRET:
|
if secret == settings.PROGRESS_CACHE_SECRET:
|
||||||
if id:
|
if not id:
|
||||||
cache.set(id,value,3600)
|
try:
|
||||||
# test
|
id = request.POST['id']
|
||||||
result = cache.get(id)
|
except KeyError:
|
||||||
|
return HttpResponse('Invalid request',400)
|
||||||
|
try:
|
||||||
|
value = request.POST['value']
|
||||||
|
except KeyError:
|
||||||
|
pass
|
||||||
|
|
||||||
return HttpResponse('progress cached '+str(result),status=200)
|
cache.set(id,value,3600)
|
||||||
else:
|
# test
|
||||||
return HttpResponse('access denied',status=400)
|
result = cache.get(id)
|
||||||
|
|
||||||
else:
|
return HttpResponse('progress cached '+str(result),
|
||||||
return HttpResponse('hi',status=200)
|
status=201)
|
||||||
|
else: # secret not given
|
||||||
|
return HttpResponse('access denied',status=401)
|
||||||
|
|
||||||
|
else: # request method is not POST
|
||||||
|
return HttpResponse('GET method not allowed',status=405)
|
||||||
|
|
||||||
def get_all_queued_jobs(userid=0):
|
def get_all_queued_jobs(userid=0):
|
||||||
r = StrictRedis()
|
r = StrictRedis()
|
||||||
@@ -3239,7 +3253,10 @@ def workout_update_cp_view(request,id=0):
|
|||||||
|
|
||||||
dataprep.runcpupdate(r)
|
dataprep.runcpupdate(r)
|
||||||
|
|
||||||
url = reverse(otwrankings_view)
|
if row.workouttype in ('water','coastal'):
|
||||||
|
url = reverse(otwrankings_view)
|
||||||
|
else:
|
||||||
|
url = reverse(oterankings_view)
|
||||||
|
|
||||||
return HttpResponseRedirect(url)
|
return HttpResponseRedirect(url)
|
||||||
|
|
||||||
@@ -7571,6 +7588,7 @@ def workout_add_chart_view(request,id,plotnr=1):
|
|||||||
@login_required()
|
@login_required()
|
||||||
def workout_stravaimport_view(request,message=""):
|
def workout_stravaimport_view(request,message=""):
|
||||||
res = stravastuff.get_strava_workout_list(request.user)
|
res = stravastuff.get_strava_workout_list(request.user)
|
||||||
|
|
||||||
if (res.status_code != 200):
|
if (res.status_code != 200):
|
||||||
if (res.status_code == 401):
|
if (res.status_code == 401):
|
||||||
r = getrower(request.user)
|
r = getrower(request.user)
|
||||||
@@ -7609,7 +7627,7 @@ def workout_stravaimport_view(request,message=""):
|
|||||||
res = dict(zip(keys,values))
|
res = dict(zip(keys,values))
|
||||||
workouts.append(res)
|
workouts.append(res)
|
||||||
|
|
||||||
|
|
||||||
return render(request,'strava_list_import.html',
|
return render(request,'strava_list_import.html',
|
||||||
{'workouts':workouts,
|
{'workouts':workouts,
|
||||||
'teams':get_my_teams(request.user),
|
'teams':get_my_teams(request.user),
|
||||||
@@ -8176,7 +8194,11 @@ def workout_upload_view(request,
|
|||||||
|
|
||||||
if 'uploadoptions' in request.session:
|
if 'uploadoptions' in request.session:
|
||||||
uploadoptions = request.session['uploadoptions']
|
uploadoptions = request.session['uploadoptions']
|
||||||
uploadoptions['landingpage'] = r.defaultlandingpage
|
try:
|
||||||
|
defaultlandingpage = uploadoptions['landingpage']
|
||||||
|
except KeyError:
|
||||||
|
uploadoptions['landingpage'] = r.defaultlandingpage
|
||||||
|
defaultlandingpage = r.defaultlandingpage
|
||||||
else:
|
else:
|
||||||
request.session['uploadoptions'] = uploadoptions
|
request.session['uploadoptions'] = uploadoptions
|
||||||
|
|
||||||
@@ -8208,6 +8230,7 @@ def workout_upload_view(request,
|
|||||||
landingpage = uploadoptions['landingpage']
|
landingpage = uploadoptions['landingpage']
|
||||||
except KeyError:
|
except KeyError:
|
||||||
landingpage = r.defaultlandingpage
|
landingpage = r.defaultlandingpage
|
||||||
|
uploadoptions['landingpage'] = landingpage
|
||||||
|
|
||||||
try:
|
try:
|
||||||
upload_to_c2 = uploadoptions['upload_to_C2']
|
upload_to_c2 = uploadoptions['upload_to_C2']
|
||||||
@@ -8276,7 +8299,7 @@ def workout_upload_view(request,
|
|||||||
'upload_to_RunKeeper':upload_to_rk,
|
'upload_to_RunKeeper':upload_to_rk,
|
||||||
'upload_to_MapMyFitness':upload_to_ua,
|
'upload_to_MapMyFitness':upload_to_ua,
|
||||||
'upload_to_TrainingPeaks':upload_to_tp,
|
'upload_to_TrainingPeaks':upload_to_tp,
|
||||||
'landingpage':r.defaultlandingpage,
|
'landingpage':landingpage,
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
@@ -9153,7 +9176,8 @@ def rower_favoritecharts_view(request):
|
|||||||
'xparam':f.xparam,
|
'xparam':f.xparam,
|
||||||
'plottype':f.plottype,
|
'plottype':f.plottype,
|
||||||
'workouttype':f.workouttype,
|
'workouttype':f.workouttype,
|
||||||
'reststrokes':f.reststrokes}
|
'reststrokes':f.reststrokes,
|
||||||
|
'notes':f.notes,}
|
||||||
for f in favorites]
|
for f in favorites]
|
||||||
FavoriteChartFormSet = formset_factory(FavoriteForm,formset=BaseFavoriteFormSet,extra=0)
|
FavoriteChartFormSet = formset_factory(FavoriteForm,formset=BaseFavoriteFormSet,extra=0)
|
||||||
if aantal==0:
|
if aantal==0:
|
||||||
|
|||||||
+1
-26
@@ -9,32 +9,7 @@
|
|||||||
<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01//EN">
|
<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01//EN">
|
||||||
<html lang="en">
|
<html lang="en">
|
||||||
<head>
|
<head>
|
||||||
<script type='text/javascript'
|
{% block scripts %} {% endblock %}
|
||||||
src='https://ajax.googleapis.com/ajax/libs/jquery/2.1.4/jquery.min.js'>
|
|
||||||
</script>
|
|
||||||
|
|
||||||
<script type="text/javascript">
|
|
||||||
window.jQuery || document.write('<script src="/static/js/jquery-3.1.0.js"><' + '/script>');
|
|
||||||
</script>
|
|
||||||
|
|
||||||
|
|
||||||
<script>
|
|
||||||
var previous = null;
|
|
||||||
var current = null;
|
|
||||||
(function checkJobs() {
|
|
||||||
console.log('polling');
|
|
||||||
$.getJSON(window.location.protocol + '//'+window.location.host + '/rowers/list-jobs/', function(json) {
|
|
||||||
current = JSON.stringify(json);
|
|
||||||
if (previous && current && previous !== current) {
|
|
||||||
console.log('refresh');
|
|
||||||
location.reload();
|
|
||||||
};
|
|
||||||
previous = current;
|
|
||||||
});
|
|
||||||
setTimeout(checkJobs, 15000);
|
|
||||||
}());
|
|
||||||
|
|
||||||
</script>
|
|
||||||
|
|
||||||
<script src="/static/cookielaw/js/cookielaw.js"></script>
|
<script src="/static/cookielaw/js/cookielaw.js"></script>
|
||||||
{% analytical_head_top %}
|
{% analytical_head_top %}
|
||||||
|
|||||||
Reference in New Issue
Block a user