Merge branch 'develop' into feature/betterdistance
This commit is contained in:
@@ -2208,7 +2208,6 @@ def interactive_chart(id=0,promember=0):
|
|||||||
|
|
||||||
script, div = components(plot)
|
script, div = components(plot)
|
||||||
|
|
||||||
|
|
||||||
return [script,div]
|
return [script,div]
|
||||||
|
|
||||||
def interactive_multiflex(datadf,xparam,yparam,groupby,extratitle='',
|
def interactive_multiflex(datadf,xparam,yparam,groupby,extratitle='',
|
||||||
|
|||||||
@@ -28,6 +28,7 @@
|
|||||||
<tr>
|
<tr>
|
||||||
<th> Country</th>
|
<th> Country</th>
|
||||||
<th> Name</th>
|
<th> Name</th>
|
||||||
|
<th> Distance</th>
|
||||||
</tr>
|
</tr>
|
||||||
</thead>
|
</thead>
|
||||||
<tbody>
|
<tbody>
|
||||||
@@ -41,6 +42,9 @@
|
|||||||
<a href="/rowers/courses/{{ course.id }}">{{ course.name }}</a>
|
<a href="/rowers/courses/{{ course.id }}">{{ course.name }}</a>
|
||||||
{% endif %}
|
{% endif %}
|
||||||
</td>
|
</td>
|
||||||
|
<td>
|
||||||
|
{{ course|courselength }} m
|
||||||
|
</td>
|
||||||
|
|
||||||
</tr>
|
</tr>
|
||||||
|
|
||||||
|
|||||||
@@ -103,7 +103,7 @@
|
|||||||
<a class="small" href="/rowers/sessions/{{ ps.id }}/edit/{{ timeperiod }}/rower/{{ rower.id }}">Edit</a>
|
<a class="small" href="/rowers/sessions/{{ ps.id }}/edit/{{ timeperiod }}/rower/{{ rower.id }}">Edit</a>
|
||||||
</td>
|
</td>
|
||||||
<td>
|
<td>
|
||||||
<a class="small" href="/rowers/sessions/{{ ps.id }}/clone/{{ timeperoid }}/rower/{{ rower.id }}">Clone</a>
|
<a class="small" href="/rowers/sessions/{{ ps.id }}/clone/{{ timeperiod }}/rower/{{ rower.id }}">Clone</a>
|
||||||
</td>
|
</td>
|
||||||
|
|
||||||
<td>
|
<td>
|
||||||
|
|||||||
@@ -96,7 +96,8 @@
|
|||||||
<a class="small" href="/rowers/sessions/{{ ps.id }}/edit/{{ timeperiod }}/rower/{{ rower.id }}">Edit</a>
|
<a class="small" href="/rowers/sessions/{{ ps.id }}/edit/{{ timeperiod }}/rower/{{ rower.id }}">Edit</a>
|
||||||
</td>
|
</td>
|
||||||
<td>
|
<td>
|
||||||
<a class="small" href="/rowers/sessions/{{ ps.id }}/clone/{{ timeperiod }}/rower/{{ rower.id }}">Clone</a>
|
<a class="small"
|
||||||
|
href="/rowers/sessions/{{ ps.id }}/clone/{{ timeperiod }}/rower/{{ rower.id }}">Clone</a>
|
||||||
</td>
|
</td>
|
||||||
<td>
|
<td>
|
||||||
<a class="small" href="/rowers/sessions/{{ ps.id }}/deleteconfirm">Delete</a>
|
<a class="small" href="/rowers/sessions/{{ ps.id }}/deleteconfirm">Delete</a>
|
||||||
|
|||||||
@@ -7,6 +7,7 @@ import json
|
|||||||
import datetime
|
import datetime
|
||||||
register = template.Library()
|
register = template.Library()
|
||||||
from rowers.utils import calculate_age
|
from rowers.utils import calculate_age
|
||||||
|
from rowers.models import course_length
|
||||||
from rowers.plannedsessions import (
|
from rowers.plannedsessions import (
|
||||||
race_can_register, race_can_submit,race_rower_status
|
race_can_register, race_can_submit,race_rower_status
|
||||||
)
|
)
|
||||||
@@ -75,6 +76,9 @@ def deltatimeprint(d):
|
|||||||
else:
|
else:
|
||||||
return strfdeltah(d)
|
return strfdeltah(d)
|
||||||
|
|
||||||
|
@register.filter
|
||||||
|
def courselength(course):
|
||||||
|
return course_length(course)
|
||||||
|
|
||||||
@register.filter(is_safe=True)
|
@register.filter(is_safe=True)
|
||||||
def jsdict(dict,key):
|
def jsdict(dict,key):
|
||||||
|
|||||||
@@ -463,9 +463,9 @@ urlpatterns = [
|
|||||||
url(r'^sessions/multicreate/(?P<timeperiod>[\w\ ]+.*)$',
|
url(r'^sessions/multicreate/(?P<timeperiod>[\w\ ]+.*)$',
|
||||||
views.plannedsession_multicreate_view),
|
views.plannedsession_multicreate_view),
|
||||||
|
|
||||||
url(r'^sessions/(?P<id>\d+)/edit$',views.plannedsession_edit_view),
|
|
||||||
url(r'^sessions/(?P<id>\d+)/edit/(?P<timeperiod>[\w\ ]+.*)/rower/(?P<rowerid>\d+)$',views.plannedsession_edit_view),
|
url(r'^sessions/(?P<id>\d+)/edit/(?P<timeperiod>[\w\ ]+.*)/rower/(?P<rowerid>\d+)$',views.plannedsession_edit_view),
|
||||||
url(r'^sessions/(?P<id>\d+)/edit/(?P<timeperiod>[\w\ ]+.*)$',views.plannedsession_edit_view),
|
url(r'^sessions/(?P<id>\d+)/edit/(?P<timeperiod>[\w\ ]+.*)$',views.plannedsession_edit_view),
|
||||||
|
url(r'^sessions/(?P<id>\d+)/edit$',views.plannedsession_edit_view),
|
||||||
|
|
||||||
url(r'^sessions/(?P<id>\d+)/clone$',views.plannedsession_clone_view),
|
url(r'^sessions/(?P<id>\d+)/clone$',views.plannedsession_clone_view),
|
||||||
url(r'^sessions/(?P<id>\d+)/clone/(?P<timeperiod>[\w\ ]+.*)/rower/(?P<rowerid>\d+)$',views.plannedsession_clone_view),
|
url(r'^sessions/(?P<id>\d+)/clone/(?P<timeperiod>[\w\ ]+.*)/rower/(?P<rowerid>\d+)$',views.plannedsession_clone_view),
|
||||||
|
|||||||
@@ -10822,7 +10822,13 @@ def workout_split_view(request,id=id):
|
|||||||
splitsecond += splittime.second
|
splitsecond += splittime.second
|
||||||
splitsecond += splittime.microsecond/1.e6
|
splitsecond += splittime.microsecond/1.e6
|
||||||
splitmode = form.cleaned_data['splitmode']
|
splitmode = form.cleaned_data['splitmode']
|
||||||
ids,mesgs = dataprep.split_workout(r,row,splitsecond,splitmode)
|
try:
|
||||||
|
ids,mesgs = dataprep.split_workout(
|
||||||
|
r,row,splitsecond,splitmode
|
||||||
|
)
|
||||||
|
except IndexError:
|
||||||
|
messages.error("Something went wrong in Split")
|
||||||
|
|
||||||
for message in mesgs:
|
for message in mesgs:
|
||||||
messages.info(request,message)
|
messages.info(request,message)
|
||||||
|
|
||||||
|
|||||||
Reference in New Issue
Block a user