|
|
- from flask_wtf import FlaskForm
- from wtforms import StringField, PasswordField, SubmitField, SelectField
- from wtforms.validators import DataRequired
-
- class Book(FlaskForm):
- username = StringField(label='student_id',
- validators=[DataRequired()],
- render_kw={
- 'placeholder': 'Student ID',
- 'class': 'input_text'
- })
- password = PasswordField(label='password',
- validators=[DataRequired()],
- render_kw={
- 'placeholder': 'Password',
- 'class': 'input_text'
- })
- email = StringField(label='email',
- validators=[DataRequired()],
- render_kw={
- 'placeholder': 'Email',
- 'class': 'email'
- })
- area = SelectField(label='area',
- validators=[DataRequired()],
- render_kw={
- 'class': 'form-control'
- },
- choices=[('F1_A','一楼A区'),
- ('F1_B','一楼B区'),
- ('F1_digital_reading_area','一楼数字阅览区'),
- ('F1_study_area','一楼自习区'),
- ('F3_foreign_books','三楼外文图书借阅区'),
- ('F3_newspaper','三楼报刊区'),
- ('F4_liberal_art_books_A','四楼中文文科图书借阅区A'),
- ('F4_liberal_art_books_B','四楼中文文科图书借阅区B'),
- ('F4_liberal_art_books_C','四楼中文文科图书借阅区C'),
- ('F5_liberal_art_books','五楼中文文科图书借阅区'),
- ('F6_science_books','六楼中文理科图书借阅区')
- ],
- default='F1_A'
- )
- submit = SubmitField('confirm')
|