Last active
November 21, 2017 23:12
-
-
Save mlivingston40/7f32e236a5428ca705722fc500e58a2b to your computer and use it in GitHub Desktop.
flash flask routing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
@application.route('/correlation/result/<security1>/<security2>/<start_date>/<end_date>') | |
def correlation_result(security1,security2,start_date,end_date): | |
try: | |
c = Correlation(security1, security2, start_date, end_date) | |
except: | |
if start_date > end_date: | |
flash("Start Date can't be greater than End Date and min window is 7 days") | |
return redirect(url_for('correlation')) | |
else: | |
flash("Please be sure to select both ticker inputs from the autocomplete first and then select dates") | |
return redirect(url_for('correlation')) | |
### Code continues if no errors ### |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment