first attempt to read csv - needs improvement
This commit is contained in:
@@ -8,6 +8,8 @@ import datetime
|
||||
from django.utils import timezone
|
||||
import trueskill
|
||||
|
||||
from rowers.utils import dologging
|
||||
|
||||
def current_day(ttz=None):
|
||||
if ttz is None:
|
||||
return (datetime.datetime.now(tz=timezone.utc)).date()
|
||||
@@ -169,6 +171,16 @@ class Race(models.Model):
|
||||
athlete.trueskill_mu = rating.mu
|
||||
athlete.trueskill_sigma = rating.sigma
|
||||
athlete.save()
|
||||
u = 'Rating athlete {id} {f} {l} mu = {mu} sigma = {sigma} race {rid} {rname}'.format(
|
||||
id = id,
|
||||
f = athlete.first_name,
|
||||
l = athlete.last_name,
|
||||
mu = rating.mu,
|
||||
sigma = rating.sigma,
|
||||
rid = self.id,
|
||||
rname = self.name,
|
||||
)
|
||||
dologging('ratings.log',u)
|
||||
|
||||
self.processed = True
|
||||
self.save()
|
||||
|
||||
Reference in New Issue
Block a user