From da29ccbf41f0bd84e956a4704d77fc3d621b846e Mon Sep 17 00:00:00 2001 From: lza_menace Date: Wed, 23 Sep 2020 22:19:03 -0700 Subject: [PATCH] add logging and better catch for lack of sessions in template --- bin/prod | 2 +- suchwow/templates/post/read.html | 8 ++++---- 2 files changed, 5 insertions(+), 5 deletions(-) diff --git a/bin/prod b/bin/prod index 0abfb24..1295c77 100755 --- a/bin/prod +++ b/bin/prod @@ -5,4 +5,4 @@ export FLASK_APP=suchwow/app.py export FLASK_SECRETS=config.py export FLASK_DEBUG=0 export FLASK_ENV=production -gunicorn --bind 0.0.0.0:4000 "suchwow.app:app" -D +gunicorn --bind 0.0.0.0:4000 "suchwow.app:app" -D --log-file ./data/app.log diff --git a/suchwow/templates/post/read.html b/suchwow/templates/post/read.html index 70c4f32..2a42710 100644 --- a/suchwow/templates/post/read.html +++ b/suchwow/templates/post/read.html @@ -58,10 +58,10 @@ - - - {% if session.auth.preferred_username == post.submitter %} -
+ {% if "auth" in session %} + {% if session.auth.preferred_username == post.submitter %} +
+ {% endif %} {% endif %}