add a timestamp to graph.svg to avoid caching
This commit is contained in:
parent
15e33bef75
commit
e5163946b8
|
|
@ -6,6 +6,7 @@ from wtforms import StringField, SubmitField, IntegerField
|
|||
from wtforms.validators import DataRequired, Length, NumberRange
|
||||
from .db import db, Accomplishment
|
||||
from datetime import datetime, timedelta
|
||||
import time
|
||||
|
||||
main = Blueprint('main', __name__)
|
||||
|
||||
|
|
@ -72,6 +73,7 @@ def get_day_template_data(day_string):
|
|||
},
|
||||
"accomplishments": accomplishments,
|
||||
"total_xp": sum(a.difficulty for a in accomplishments),
|
||||
"ts": int(time.time()), # timestamp for cachebusting
|
||||
}
|
||||
|
||||
|
||||
|
|
|
|||
|
|
@ -13,7 +13,7 @@
|
|||
</form>
|
||||
</div>
|
||||
<div class="max-w-lg mx-auto card">
|
||||
<img class="w-full h-48" src="{{ url_for('graph.graph_svg') }}">
|
||||
<img class="w-full h-48" src="{{ url_for('graph.graph_svg', ts=ts) }}">
|
||||
</div>
|
||||
<div class="max-w-lg mx-auto card">
|
||||
<div class="flex items-center justify-between mb-4">
|
||||
|
|
|
|||
Loading…
Reference in New Issue