distribusi-verse/verse/forms/editorform.py

22 lines
488 B
Python
Raw Normal View History

"""Form to save your CSS editor work."""
from wtforms import (
StringField,
TextAreaField,
SubmitField,
)
from wtforms import validators
from wtforms.validators import Length
from flask_wtf import FlaskForm
class EditorForm(FlaskForm):
"""Css editor form class."""
cssname = StringField(
"fill in a name for your css style:",
validators=[validators.InputRequired(), Length(5, 200)],
)
css = TextAreaField()
submit = SubmitField("Save")