Private
Public Access
1
0

bugfix share a chart

This commit is contained in:
Sander Roosendaal
2017-10-08 13:05:27 +02:00
parent edb3cdbe2e
commit 737a59969c
3 changed files with 9 additions and 3 deletions

View File

@@ -9,7 +9,7 @@
{% block og_description %}{{ workout.name }}
{{ workout.date }} - {{ workout.distance }}m - {{ workout.duration |durationprint:"%H:%M:%S.%f" }}{% endblock %}
{% block og_image %}
<meta property="og:image" content="http://rowsandall.com/{{ graph.filename }}" />
<meta property="og:image" content="http://rowsandall.com/{{ graph.filename |spacetohtml }}" />
{% endblock %}
{% block content %}
<h1>{{ workout.name }}</h1>

View File

@@ -13,12 +13,12 @@
{% for graph in graphs1 %}
{% block og_image %}
{% for graph in graphs1 %}
<meta property="og:image" content="http://rowsandall.com/{{ graph.filename }}" />
<meta property="og:image" content="http://rowsandall.com/{{ graph.filename |spacetohtml }}" />
{% endfor %}
{% endblock %}
{% block image_src %}
{% for graph in graphs1 %}
<link rel="image_src" href="/{{ graph.filename }}" />
<link rel="image_src" href="/{{ graph.filename |spacetohtml }}" />
{% endfor %}
{% endblock %}

View File

@@ -39,6 +39,10 @@ def secondstotimestring(tdelta):
return res
@register.filter
def spacetohtml(t):
return t.replace(" ","%20")
@register.filter
def durationprint(d,dstring):
if (d == None):
@@ -113,6 +117,8 @@ def user_teams(user):
return teams
@register.filter
def has_teams(user):
try: