bugfix share a chart
This commit is contained in:
@@ -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>
|
||||
|
||||
@@ -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 %}
|
||||
|
||||
|
||||
@@ -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:
|
||||
|
||||
Reference in New Issue
Block a user