This repository has been archived on 2023-10-01. You can view files and clone it, but cannot push or open issues or pull requests.
PyNyaaTa/pynyaata/forms.py

39 lines
1.1 KiB
Python
Raw Permalink Normal View History

from flask_wtf import FlaskForm
2022-12-21 14:53:50 +00:00
from wtforms import HiddenField, SelectField, StringField
2021-12-16 23:00:44 +00:00
from wtforms.fields.html5 import SearchField, URLField
from wtforms.validators import DataRequired
class SearchForm(FlaskForm):
q = SearchField('search', validators=[DataRequired()])
class DeleteForm(FlaskForm):
class Meta:
csrf = False
id = HiddenField('id', validators=[DataRequired()])
class EditForm(FlaskForm):
id = HiddenField('id')
2021-07-10 15:28:45 +00:00
folder = SelectField('folder', validators=[DataRequired()])
name = StringField('name', validators=[DataRequired()])
link = URLField('link', validators=[DataRequired()])
season = StringField('season', validators=[DataRequired()])
comment = StringField('comment')
2020-10-27 22:20:34 +00:00
keyword = StringField('keyword', validators=[DataRequired()])
2021-07-10 15:28:45 +00:00
class FolderEditForm(FlaskForm):
id = HiddenField('id')
name = StringField('name', validators=[DataRequired()])
2021-07-11 08:52:58 +00:00
path = StringField('path')
2021-07-10 15:28:45 +00:00
class FolderDeleteForm(FlaskForm):
class Meta:
csrf = False
id = HiddenField('id', validators=[DataRequired()])