Darks
662882cc15
On ne peut pas encore modifier le top comment ni commencer un topic à partir d'un thread externe, mais les bases sont là :)
14 lines
497 B
Python
14 lines
497 B
Python
from flask_wtf import FlaskForm
|
|
from wtforms import StringField, FormField, SubmitField, TextAreaField
|
|
from wtforms.validators import DataRequired, Length
|
|
|
|
class TopicCreationForm(FlaskForm):
|
|
title = StringField('Nom du sujet',
|
|
validators=[DataRequired(), Length(min=3, max=32)])
|
|
message = TextAreaField('Message principal')
|
|
submit = SubmitField('Créer le sujet')
|
|
|
|
class CommentForm(FlaskForm):
|
|
message = TextAreaField('Commentaire')
|
|
submit = SubmitField('Commenter')
|