-
Notifications
You must be signed in to change notification settings - Fork 1
Expand file tree
/
Copy pathforms.py
More file actions
21 lines (16 loc) · 734 Bytes
/
forms.py
File metadata and controls
21 lines (16 loc) · 734 Bytes
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
from flask_wtf import FlaskForm
from wtforms import StringField, RadioField, IntegerField, SubmitField
class ChordForm(FlaskForm):
instrument = RadioField(
label='Pick an instrument',
choices=[('ukulele', 'Ukulele'), ('guitar', 'Guitar')],
default='ukulele'
)
title = StringField(label='Chord title', default=None)
positions = StringField(label='Positions', default='0000')
fingers = StringField(label='Fingers', default='----')
barre = IntegerField(label='Barre override', default=None)
render = SubmitField(label='Render diagram')
class DownloadForm(FlaskForm):
name = StringField(label='Name this image file', default='chord')
submit = SubmitField('Download image')