Add status template, use for comment deletion status
This commit is contained in:
parent
86382706fe
commit
c5827a3bb1
@ -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'])
|
||||
|
8
youtube/templates/status.html
Normal file
8
youtube/templates/status.html
Normal file
@ -0,0 +1,8 @@
|
||||
{% extends "base.html" %}
|
||||
|
||||
{% block page_title %}{{ title if (title is defined) else 'Status'}}{% endblock %}
|
||||
|
||||
{% block main %}
|
||||
{{ message }}
|
||||
{% endblock %}
|
||||
|
Loading…
x
Reference in New Issue
Block a user