Private
Public Access
1
0

stopped at empower fix (line 122 in urls.py)

This commit is contained in:
Sander Roosendaal
2018-09-28 10:56:51 +02:00
parent 40c9a789b7
commit 6ab3c08859
13 changed files with 650 additions and 169 deletions

View File

@@ -1,10 +1,10 @@
{% extends "base.html" %}
{% extends "newbase.html" %}
{% load staticfiles %}
{% load rowerfilters %}
{% block title %}Workouts{% endblock %}
{% block title %}Empower FIX{% endblock %}
{% block content %}
{% block main %}
<script>
function toggle(source) {
@@ -65,80 +65,72 @@
</script>
<div class="grid_12 alpha">
{% include "teambuttons.html" with teamid=team.id team=team %}
</div>
<div class="grid_12 alpha">
<h2>Empower Workouts</h2>
<p>This functionality is aimed at users who have uploaded workouts from
the Nielsen-Kellerman Empower Oarlock/SpeedCoach combination before the
power inflation bug was known (May 4, 2018). </p>
<h1>Empower Workouts</h1>
<p>Workouts recorded with a SpeedCoach running NK Firmware version 2.17 or
lower have Power and Work per Stroke values that are approximately
9% (sculling) or 5% too high. The exact value of the error depends on your
inboard and oar length.</p>
<p>Currently, we autocorrect workouts recorded with old Firmware upon
their upload, but workouts that were present on the site before
the bug was known still have incorrect values for Power and Work per Stroke.
</p>
<p>
You can use this page to correct those workouts.
</p>
</div>
<div class="grid_12 alpha">
<div class="grid_6 alpha">
<form enctype="multipart/form-data" action="" method="post">
<div class="grid_4 alpha">
<table>
{{ dateform.as_table }}
</table>
{% csrf_token %}
</div>
<div class="grid_2 omega">
<input name='daterange' class="button green" type="submit" value="Submit">
</div>
</form>
</div>
</div>
<form enctype="multipart/form-data" action="" method="post">
<div id="workouts_table" class="grid_8 alpha">
{% if workouts %}
<input type="checkbox" onClick="toggle(this)" /> Toggle All<br/>
<table width="100%" class="listtable">
{{ form.as_table }}
</table>
{% else %}
<p> No workouts found </p>
{% endif %}
</div>
<div id="form_settings" class="grid_4 alpha">
<p>Select workouts on the left,
and press submit</p>
<div class="grid_1 prefix_2 suffix_1">
<ul class="main-content">
<li class="grid_2">
<p>Use the date form to reduce the selection</p>
<p>
{% csrf_token %}
<input name='workoutselectform' class="button green" type="submit" value="Submit">
</p>
</div>
<div class="grid_4">
<p>You can use the date form above to reduce the selection</p>
</div>
</div>
</form>
<form enctype="multipart/form-data" action="" method="post">
<table>
{{ dateform.as_table }}
</table>
{% csrf_token %}
<input name='daterange' class="green button" type="submit" value="Submit">
</form>
</p>
</li>
<li class="grid_2">
<p>This functionality is aimed at users who have uploaded workouts from
the Nielsen-Kellerman Empower Oarlock/SpeedCoach combination before the
power inflation bug was known (May 4, 2018). </p>
<p>Workouts recorded with a SpeedCoach running NK Firmware version 2.17 or
lower have Power and Work per Stroke values that are approximately
9% (sculling) or 5% too high. The exact value of the error depends on your
inboard and oar length.</p>
<p>Currently, we autocorrect workouts recorded with old Firmware upon
their upload, but workouts that were present on the site before
the bug was known still have incorrect values for Power and Work per Stroke.
</p>
<p>
You can use this page to correct those workouts.
</p>
</li>
<li class="grid_4">
<p>
<form enctype="multipart/form-data" action="" method="post">
{% if workouts %}
<input type="checkbox" onClick="toggle(this)" /> Toggle All<br/>
<table width="100%" class="listtable">
{{ form.as_table }}
</table>
{% csrf_token %}
<input name='workoutselectform' class="button green" type="submit" value="Submit">
</form>
</p>
{% else %}
<p> No workouts found </p>
{% endif %}
</li>
{% if workouts %}
<li>
<p>Select workouts
and press submit
</p>
</li>
{% endif %}
</ul>
{% endblock %}
{% block sidebar %}
{% include 'menu_workouts.html' %}
{% endblock %}

View File

@@ -1,23 +1,24 @@
{% extends "base.html" %}
{% extends "newbase.html" %}
{% load staticfiles %}
{% load rowerfilters %}
{% block title %}Rowsandall Workouts Summary Export{% endblock %}
{% block content %}
<div class="grid_12">
<form enctype="multipart/form-data" method="post">
<div class="grid_4 alpha">
<table>
{{ form.as_table }}
</table>
{% csrf_token %}
</div>
<div class="grid_2">
<input class="button green" type="submit" value="Submit">
</div>
</form>
<div class="grid_6 omega">
{% block main %}
<h1>Export all workouts</h1>
<ul class="main-content">
<li class="grid_2">
<p>
<form enctype="multipart/form-data" method="post">
<table>
{{ form.as_table }}
</table>
{% csrf_token %}
<input class="green button" type="submit" value="Submit">
</form>
</p>
</li>
<li class="grid_2">
<p>
With this form, you can export a summary table for all workouts within a selected date range.
The table will be sent to you as a CSV file which can be opened in excel. The table contains
@@ -27,7 +28,11 @@
By setting the start date to your registration date or earlier and the end date to today,
you will receive all workout data we are storing for you.
</p>
</div>
</div>
</li>
</ul>
{% endblock %}
{% block sidebar %}
{% include 'menu_profile.html' %}
{% endblock %}

View File

@@ -1,17 +1,17 @@
<h1>Profile</h1>
<ul class="cd-accordion-menu animated">
<li id="manage-account">
<a href="">
<a href="/rowers/me/edit">
<i class="fas fa-user fa-fw"></i>&nbsp;Account
</a>
</li>
<li id="manage-impex">
<a href="">
<a href="/rowers/me/exportsettings">
<i class="fas fa-cloud-download fa-fw"></i>&nbsp;Import/Export
</a>
</li>
<li id="manage-prefs">
<a href="">
<a href="/me/preferences">
<i class="fas fa-cog fa-fw"></i>&nbsp;Preferences
</a>
</li>

View File

@@ -117,7 +117,7 @@ urlpatterns = [
url(r'^404/$', TemplateView.as_view(template_name='404.html'),name='404'),
url(r'^400/$', TemplateView.as_view(template_name='400.html'),name='400'),
url(r'^403/$', TemplateView.as_view(template_name='403.html'),name='403'),
url(r'^imports/$', views.imports_view),
# url(r'^imports/$', views.imports_view),
url(r'^exportallworkouts/?$',views.workouts_summaries_email_view),
url(r'^update_empower$',views.rower_update_empower_view),
url(r'^agegroupcp/(?P<age>\d+)$',views.agegroupcpview),
@@ -557,6 +557,10 @@ urlpatterns = [
url(r'^courses/(?P<id>\d+)/replace$',views.course_replace_view),
url(r'^courses/(?P<id>\d+)$',views.course_view),
url(r'^courses/(?P<id>\d+)/map$',views.course_map_view),
# URLS to be created
# url(r'^me/preferences$',views.user_preferences_view),
# url(r'^help$',views.user_preferences_view),TemplateView.as_view(template_name='help.html'), name='help'),
]
if settings.DEBUG:

View File

@@ -12015,6 +12015,7 @@ def rower_update_empower_view(
return render(request, 'empower_fix.html',
{'workouts':workouts,
'active': 'nav-workouts',
'dateform':dateform,
'form':form,
'rower':r