aboutsummaryrefslogtreecommitdiff
path: root/app/forms.py
diff options
context:
space:
mode:
authorNavan Chauhan <navanchauhan@gmail.com>2020-06-24 23:39:05 +0530
committerNavan Chauhan <navanchauhan@gmail.com>2020-06-24 23:39:05 +0530
commite52c18a09cabd374093b06ef0f521767cd228ba6 (patch)
tree6548d357ba45e75334da8c225a0c6cd5f77f0850 /app/forms.py
make it better
Diffstat (limited to 'app/forms.py')
-rw-r--r--app/forms.py30
1 files changed, 30 insertions, 0 deletions
diff --git a/app/forms.py b/app/forms.py
new file mode 100644
index 0000000..5d64507
--- /dev/null
+++ b/app/forms.py
@@ -0,0 +1,30 @@
+from flask_wtf import FlaskForm
+from flask_wtf.file import FileField, FileRequired, FileAllowed
+from wtforms import StringField, DecimalField
+from wtforms.validators import DataRequired, Email
+
+
+class MyForm(FlaskForm):
+ firstname = StringField('First Name', validators=[DataRequired()])
+ lastname = StringField('Last Name', validators=[DataRequired()])
+ email = StringField('Email', validators=[DataRequired(), Email()])
+
+
+class curieForm(FlaskForm):
+ ligand = FileField('Ligand', validators=[
+ FileRequired(),
+ FileAllowed(['pdbqt', 'PDBQT only!'])
+ ])
+ target = FileField('Receptor / Target', validators=[
+ FileRequired(),
+ FileAllowed(['pdbqt', 'PDBQT only!'])
+ ])
+ description = StringField('Description',default="Curie Web Task")
+
+ size_x = DecimalField('Size X',default=25.0)
+ size_y = DecimalField('Size Y',default=25.0)
+ size_z = DecimalField('Size Z',default=25.0)
+
+ center_x = DecimalField('Center X',default=0)
+ center_y = DecimalField('Center Y',default=0)
+ center_z = DecimalField('Center Z',default=0) \ No newline at end of file