add logging and better catch for lack of sessions in template

graphs-n-shit
lza_menace 4 years ago
parent fa0a6461d4
commit da29ccbf41

@ -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

@ -58,10 +58,10 @@
<a href="{{ url_for('comment.create', post_id=post.id) }}"><button class="btn btn-warning">Leave a Comment</button></a>
{% if session.auth.preferred_username == post.submitter %}
<hr><a href="{{ url_for('post.delete', id=post.id) }}"><button class="btn btn-danger">Delete Post</button></a>
{% if "auth" in session %}
{% if session.auth.preferred_username == post.submitter %}
<hr><a href="{{ url_for('post.delete', id=post.id) }}"><button class="btn btn-danger">Delete Post</button></a>
{% endif %}
{% endif %}
</div>