bugfix share a chart
This commit is contained in:
@@ -9,7 +9,7 @@
|
|||||||
{% block og_description %}{{ workout.name }}
|
{% block og_description %}{{ workout.name }}
|
||||||
{{ workout.date }} - {{ workout.distance }}m - {{ workout.duration |durationprint:"%H:%M:%S.%f" }}{% endblock %}
|
{{ workout.date }} - {{ workout.distance }}m - {{ workout.duration |durationprint:"%H:%M:%S.%f" }}{% endblock %}
|
||||||
{% block og_image %}
|
{% 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 %}
|
{% endblock %}
|
||||||
{% block content %}
|
{% block content %}
|
||||||
<h1>{{ workout.name }}</h1>
|
<h1>{{ workout.name }}</h1>
|
||||||
|
|||||||
@@ -13,12 +13,12 @@
|
|||||||
{% for graph in graphs1 %}
|
{% for graph in graphs1 %}
|
||||||
{% block og_image %}
|
{% block og_image %}
|
||||||
{% for graph in graphs1 %}
|
{% 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 %}
|
{% endfor %}
|
||||||
{% endblock %}
|
{% endblock %}
|
||||||
{% block image_src %}
|
{% block image_src %}
|
||||||
{% for graph in graphs1 %}
|
{% for graph in graphs1 %}
|
||||||
<link rel="image_src" href="/{{ graph.filename }}" />
|
<link rel="image_src" href="/{{ graph.filename |spacetohtml }}" />
|
||||||
{% endfor %}
|
{% endfor %}
|
||||||
{% endblock %}
|
{% endblock %}
|
||||||
|
|
||||||
|
|||||||
@@ -39,6 +39,10 @@ def secondstotimestring(tdelta):
|
|||||||
|
|
||||||
return res
|
return res
|
||||||
|
|
||||||
|
@register.filter
|
||||||
|
def spacetohtml(t):
|
||||||
|
return t.replace(" ","%20")
|
||||||
|
|
||||||
@register.filter
|
@register.filter
|
||||||
def durationprint(d,dstring):
|
def durationprint(d,dstring):
|
||||||
if (d == None):
|
if (d == None):
|
||||||
@@ -113,6 +117,8 @@ def user_teams(user):
|
|||||||
|
|
||||||
return teams
|
return teams
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
@register.filter
|
@register.filter
|
||||||
def has_teams(user):
|
def has_teams(user):
|
||||||
try:
|
try:
|
||||||
|
|||||||
Reference in New Issue
Block a user