crunk
4 years ago
10 changed files with 121 additions and 12 deletions
@ -0,0 +1,33 @@ |
|||
"""Form object declaration.""" |
|||
from flask_wtf import FlaskForm |
|||
from wtforms import ( |
|||
StringField, |
|||
SubmitField, |
|||
) |
|||
from wtforms import validators |
|||
from wtforms.validators import Length |
|||
|
|||
|
|||
|
|||
class BorrowForm(FlaskForm): |
|||
"""Borrow a book form.""" |
|||
|
|||
borrowed = StringField( |
|||
"Fill in your name if you're going to borrow this publication.", |
|||
[ |
|||
validators.InputRequired(), |
|||
Length( |
|||
min=3, message="Just so we know who is borrowing this book." |
|||
), |
|||
], |
|||
) |
|||
secret = StringField( |
|||
"Librarians secret:", |
|||
[ |
|||
validators.InputRequired(), |
|||
Length( |
|||
min=2, message="Fill in the secret to unlock to library." |
|||
), |
|||
], |
|||
) |
|||
submit = SubmitField("Borrow") |
Can't render this file because it has a wrong number of fields in line 10.
|
@ -0,0 +1 @@ |
|||
$2b$12$kZC/e1smAiBCntQxLUpsZ.H0Y5VkWG/YLt18wIdGmONtijkXYaVsO |
Loading…
Reference in new issue