default HTML page to be loaded with plans

legacy
Steve L. Nyemba 4 years ago
parent 7703e196d4
commit f22bf02c54

@ -62,10 +62,15 @@ SYS_STORE = CONFIG['store']
# return render_template('donate.html',**args) # return render_template('donate.html',**args)
@app.route("/") @app.route("/")
def index(): def index():
if 'default' in CONFIG:
id = CONFIG['default']['id']
return get_plans_ui(id)
headers = {"content-type":"application/json"}
mystore = store.factory.instance(name='music') mystore = store.factory.instance(name='music')
products = mystore.get.products() products = mystore.get.products()
args = {"context":CONTEXT,"products":products} args = {"context":CONTEXT,"products":products}
return json.dumps(products),"content-type:application/json" return json.dumps(products),headers
# return render_template("index.html",**args) # return render_template("index.html",**args)
@app.route("/json/<id>") @app.route("/json/<id>")
def get_plans_json(id): def get_plans_json(id):

@ -2,6 +2,7 @@
"about":{ "about":{
"version":"0.4", "version":"0.4",
"author":"The Phi Technology" "author":"The Phi Technology"
}, },
"stripe":{ "stripe":{
"secret": "sk_test_I16uOM1ZfGALSc03AF0xqN2z", "secret": "sk_test_I16uOM1ZfGALSc03AF0xqN2z",
@ -17,6 +18,9 @@
"exp_year":{"pattern":"^20[0-2]{2}"} "exp_year":{"pattern":"^20[0-2]{2}"}
} }
}, },
"default":{
"id":"healthcareio"
},
"cloud-view":"http://localhost/cloud-view/:id", "cloud-view":"http://localhost/cloud-view/:id",
"redir_url":"http://localhost/:context/oauth.html", "redir_url":"http://localhost/:context/oauth.html",

Loading…
Cancel
Save