diff options
author | Navan Chauhan <navanchauhan@gmail.com> | 2021-06-03 22:44:14 +0530 |
---|---|---|
committer | Navan Chauhan <navanchauhan@gmail.com> | 2021-06-03 22:44:14 +0530 |
commit | 14f6b5800512af53fb7d1d9bfeeddcce894ecadf (patch) | |
tree | 424f71cb3031ace78e45ab20b8fe07f0bb99eb4d | |
parent | aa91b02e11cf699bc55387c26cc2c82ac3696dfd (diff) |
added form support
-rw-r--r-- | app/forms/__init__.py | 0 | ||||
-rw-r--r-- | app/forms/app_forms.py | 10 |
2 files changed, 10 insertions, 0 deletions
diff --git a/app/forms/__init__.py b/app/forms/__init__.py new file mode 100644 index 0000000..e69de29 --- /dev/null +++ b/app/forms/__init__.py diff --git a/app/forms/app_forms.py b/app/forms/app_forms.py new file mode 100644 index 0000000..92913d6 --- /dev/null +++ b/app/forms/app_forms.py @@ -0,0 +1,10 @@ +from flask_wtf import FlaskForm +from wtforms import StringField, TextAreaField +from wtforms.fields.html5 import EmailField +from wtforms.validators import DataRequired, Email + +class MyForm(FlaskForm): + name = StringField('Name', validators=[DataRequired()]) + email = EmailField('Email', validators=[DataRequired(), Email()]) + subject = StringField('Subject', validators=[DataRequired()]) + body = TextAreaField('Message', validators=[DataRequired()])
\ No newline at end of file |