diff --git a/rowers/interactiveplots.py b/rowers/interactiveplots.py
index dbca08ba..51f4d105 100644
--- a/rowers/interactiveplots.py
+++ b/rowers/interactiveplots.py
@@ -2047,6 +2047,147 @@ def leaflet_chart(lat,lon,name=""):
+ return script,div
+
+def leaflet_chart_compare(workoutids,labeldict={},startenddict={}):
+ data = []
+ for id in workoutids:
+ w = Workout.objects.get(id=id)
+ rowdata = rdata(w.csvfilename)
+ df = pd.DataFrame({
+ 'id':id,
+ 'lat':rowdata.df[' latitude'],
+ 'lon':rowdata.df[' longitude']
+ })
+ data.append(f)
+
+ df = pd.concat(data,axis=0)
+
+
+
+
+ # Throw out 0,0
+ df = df.replace(0,np.nan)
+ df = df.loc[(df!=0).any(axis=1)]
+ df.fillna(method='bfill',axis=0,inplace=True)
+ df.fillna(method='ffill',axis=0,inplace=True)
+ lat = df['lat']
+ lon = df['lon']
+ if lat.empty or lon.empty:
+ return [0,"invalid coordinate data"]
+
+
+
+ coordinates = zip(lat,lon)
+
+ scoordinates = "["
+
+ for x,y in coordinates:
+ scoordinates += """[{x},{y}],
+ """.format(
+ x=x,
+ y=y
+ )
+
+ scoordinates += "]"
+
+ script = """
+
+ """.format(
+ latmean=latmean,
+ lonmean=lonmean,
+ latbegin = latbegin,
+ latend=latend,
+ longbegin=longbegin,
+ longend=longend,
+ scoordinates=scoordinates,
+ )
+
+ div = """
+
+ """
+
+
+
return script,div
def leaflet_chart2(lat,lon,name=""):
@@ -5057,13 +5198,11 @@ def interactive_multiple_compare_chart(ids,xparam,yparam,plottype='line',
'time','pace','workoutstate',
'workoutid']
- datadf = dataprep.getsmallrowdata_db(columns,ids=ids,doclean=False,compute=False)
-
+ datadf = dataprep.getsmallrowdata_db(columns,ids=ids)
datadf.dropna(axis=1,how='all',inplace=True)
datadf.dropna(axis=0,how='any',inplace=True)
-
nrworkouts = len(ids)
try:
diff --git a/rowers/models.py b/rowers/models.py
index 6e57bfaa..c7cbf391 100644
--- a/rowers/models.py
+++ b/rowers/models.py
@@ -2920,7 +2920,8 @@ def update_duplicates_on_delete(sender, instance, **kwargs):
class VirtualRaceFollower(models.Model):
user = models.ForeignKey(User,on_delete=models.CASCADE,null=True)
race = models.ForeignKey(VirtualRace,on_delete=models.CASCADE)
- emailaddress = models.EmailField(max_length=254,blank=True,null=True)
+ emailaddress = models.EmailField(max_length=254,blank=True,null=True,
+ verbose_name="Email Address")
class FollowerForm(ModelForm):
class Meta:
diff --git a/rowers/templates/followerform.html b/rowers/templates/followerform.html
index 248e2d04..15b2231c 100644
--- a/rowers/templates/followerform.html
+++ b/rowers/templates/followerform.html
@@ -9,9 +9,14 @@
{% block main %}
-Comments {{ plannedession.name }}
+Follow {{ plannedession.name }}
+
+ -
+
To follow this challenge and receive all news per email, fill out your
+ email address and submit the form.
+
-