-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathforms.py
More file actions
15 lines (13 loc) · 730 Bytes
/
forms.py
File metadata and controls
15 lines (13 loc) · 730 Bytes
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
from flask_wtf import FlaskForm
from wtforms import StringField, SubmitField, BooleanField
from wtforms.validators import Optional
class SearchForm(FlaskForm):
album = StringField('Album', validators=[Optional()], render_kw={"placeholder": "Album or song title..."})
artist = StringField('Artist', validators=[Optional()], render_kw={"placeholder": "Artist..."})
apple_url = StringField('Apple URL', validators=[Optional()], render_kw={"placeholder": "https://music.apple.com/..."})
single_song_only = BooleanField('Single song only')
search = SubmitField('Search')
download_from_url = SubmitField('Download From URL')
class ConfirmForm(FlaskForm):
yes = SubmitField('Yes')
no = SubmitField('No')