Book a Demo!
CoCalc Logo Icon
StoreFeaturesDocsShareSupportNewsAboutPoliciesSign UpSign In
sreenivasdoosa
GitHub Repository: sreenivasdoosa/sdoosa-algo-trade-python
Path: blob/master/src/restapis/HomeAPI.py
296 views
1
from flask.views import MethodView
2
from flask import render_template, request
3
4
class HomeAPI(MethodView):
5
def get(self):
6
if 'loggedIn' in request.args and request.args['loggedIn'] == 'true':
7
return render_template('index_loggedin.html')
8
elif 'algoStarted' in request.args and request.args['algoStarted'] == 'true':
9
return render_template('index_algostarted.html')
10
else:
11
return render_template('index.html')
12
13