add logging and better catch for lack of sessions in template

This commit is contained in:
lza_menace 2020-09-23 22:19:03 -07:00
parent fa0a6461d4
commit da29ccbf41
2 changed files with 5 additions and 5 deletions

View file

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

View file

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