Merge branch 'release/v13.33'
This commit is contained in:
@@ -254,7 +254,6 @@ success: function(result) {
|
|||||||
console.log('got something back');
|
console.log('got something back');
|
||||||
console.log(result);
|
console.log(result);
|
||||||
if (result.result == 1) {
|
if (result.result == 1) {
|
||||||
setTimeout(1000);
|
|
||||||
window.location.href = result.url;
|
window.location.href = result.url;
|
||||||
} else {
|
} else {
|
||||||
console.log(result," reloading");
|
console.log(result," reloading");
|
||||||
|
|||||||
@@ -94,7 +94,7 @@
|
|||||||
<tbody>
|
<tbody>
|
||||||
{% if race.sessiontype == 'race' %}
|
{% if race.sessiontype == 'race' %}
|
||||||
<tr>
|
<tr>
|
||||||
<th>Course</th><td>{{ race.course }}</td>
|
<th>Course</th><td><a href="/rowers/courses/{{ race.course.id }}">{{ race.course }}</a></td>
|
||||||
</tr>
|
</tr>
|
||||||
{% else %}
|
{% else %}
|
||||||
<tr>
|
<tr>
|
||||||
|
|||||||
@@ -9,6 +9,7 @@ from rowers.scoring import *
|
|||||||
|
|
||||||
from django.contrib.gis.geoip2 import GeoIP2
|
from django.contrib.gis.geoip2 import GeoIP2
|
||||||
from django import forms
|
from django import forms
|
||||||
|
from rowers.plannedsessions import timefield_to_seconds_duration
|
||||||
|
|
||||||
# distance of course from lat_lon in km
|
# distance of course from lat_lon in km
|
||||||
def howfaris(lat_lon,course):
|
def howfaris(lat_lon,course):
|
||||||
@@ -3500,7 +3501,14 @@ def virtualevent_entry_edit_view(request,id=0,entryid=0):
|
|||||||
return HttpResponseRedirect(returnurl)
|
return HttpResponseRedirect(returnurl)
|
||||||
|
|
||||||
if record.points != 0:
|
if record.points != 0:
|
||||||
record.points = record.points*record.referencespeed/referencespeed
|
if race.sessiontype == 'race':
|
||||||
|
coursedistance = race.course.distance
|
||||||
|
else:
|
||||||
|
coursedistance = record.distance
|
||||||
|
v = coursedistance/timefield_to_seconds_duration(record.duration)
|
||||||
|
points = 100.*(2-(referencespeed/v))
|
||||||
|
record.points = points
|
||||||
|
|
||||||
|
|
||||||
record.teamname = teamname
|
record.teamname = teamname
|
||||||
record.weightcategory=weightcategory
|
record.weightcategory=weightcategory
|
||||||
|
|||||||
Reference in New Issue
Block a user