mirror of
https://github.com/csd4ni3l/grass_touching_captcha.git
synced 2026-01-01 12:33:45 +01:00
convert last_grass_touch_time to float so it can subtract in jinja2
This commit is contained in:
4
main.py
4
main.py
@@ -272,7 +272,7 @@ def profile():
|
||||
|
||||
grass_touching_count, last_grass_touch_time = row
|
||||
|
||||
return render_template("profile.jinja2", username=username, grass_touching_count=grass_touching_count, last_grass_touch_time=last_grass_touch_time, now=time.time(), your_account=True)
|
||||
return render_template("profile.jinja2", username=username, grass_touching_count=grass_touching_count, last_grass_touch_time=float(last_grass_touch_time), now=time.time(), your_account=True)
|
||||
|
||||
@app.route("/profile/<username>")
|
||||
def public_profile(username):
|
||||
@@ -289,7 +289,7 @@ def public_profile(username):
|
||||
|
||||
grass_touching_count, last_grass_touch_time = row
|
||||
|
||||
return render_template("profile.jinja2", username=username, grass_touching_count=grass_touching_count, last_grass_touch_time=last_grass_touch_time, now=time.time(), your_account=False)
|
||||
return render_template("profile.jinja2", username=username, grass_touching_count=grass_touching_count, last_grass_touch_time=float(last_grass_touch_time), now=time.time(), your_account=False)
|
||||
|
||||
@app.route("/login", methods=["GET", "POST"])
|
||||
def login():
|
||||
|
||||
Reference in New Issue
Block a user