My-Website/app/comment.py
2024-04-03 13:13:48 -05:00

23 lines
438 B
Python

import json
import flask
import flask_session
import flask_wtf.csrf
import wtforms
comments = flask.Blueprint('comment', __name__, template_folder='./templates')
class CommentForm(flask_wtf.FlaskForm):
textbox = wtforms.TextAreaField('Input')
@comments.route('/comment/', methods=['POST'])
def comment():
form = CommentForm(csrf_enabled=True)
return flask.redirect('/')
def get_comments(post_id : int) -> list[dict]: