Skip to content

Instantly share code, notes, and snippets.

@mlivingston40
Last active November 7, 2017 23:19
Show Gist options
  • Save mlivingston40/3d0e06f1ea5cd2bd0dc4f90421302630 to your computer and use it in GitHub Desktop.
Save mlivingston40/3d0e06f1ea5cd2bd0dc4f90421302630 to your computer and use it in GitHub Desktop.
@application.route('/correlation', methods=['GET', 'POST'])
def correlation():
form = CorrelationForm()
if request.method == 'POST' and form.validate():
security1 = request.form['stock1']
security2 = request.form['stock2']
start_date = request.form['date_start']
end_date = request.form['date_end']
return redirect(url_for('correlation_result', security1=security1,
security2=security2, start_date=start_date,
end_date=end_date))
return render_template('correlation.html', form=form)
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment