Add status template, use for comment deletion status

This commit is contained in:
James Taylor 2019-07-21 22:43:29 -07:00
parent 86382706fe
commit c5827a3bb1
2 changed files with 10 additions and 2 deletions

View File

@ -128,11 +128,11 @@ def delete_comment():
@yt_app.route('/comment_delete_success')
def comment_delete_success():
return 'Successfully deleted comment'
return flask.render_template('status.html', title='Success', message='Successfully deleted comment')
@yt_app.route('/comment_delete_fail')
def comment_delete_fail():
return 'Failed to delete comment'
return flask.render_template('status.html', title='Error', message='Failed to delete comment')
@yt_app.route('/post_comment', methods=['POST'])
@yt_app.route('/comments', methods=['POST'])

View File

@ -0,0 +1,8 @@
{% extends "base.html" %}
{% block page_title %}{{ title if (title is defined) else 'Status'}}{% endblock %}
{% block main %}
{{ message }}
{% endblock %}