Skip to content

Instantly share code, notes, and snippets.

@mlivingston40
Last active November 7, 2017 23:05
Show Gist options
  • Save mlivingston40/870f36bc3a4c52bac3fa866cdbb66955 to your computer and use it in GitHub Desktop.
Save mlivingston40/870f36bc3a4c52bac3fa866cdbb66955 to your computer and use it in GitHub Desktop.
from flask_wtf import FlaskForm
from wtforms import StringField, DateField, validators
class CorrelationForm(FlaskForm):
stock1 = StringField('Stock 1',
[validators.Required('Start typing ticker symbol and select'),
validators.Length(min=1, max=5)], id = "ticker1")
stock2 = StringField('Stock 2',
[validators.Required('Start typing ticker symbol and select'),
validators.Length(min=1, max=5)], id = "ticker2")
date_start = DateField('Start Date',
[validators.Required('Please select a start date')],
format='%Y-%m-%d')
date_end = DateField('End Date',
[validators.Required('Please select an end date')],
format='%Y-%m-%d')
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment