|
|
@ -88,7 +88,7 @@ def home():
|
|
|
|
return render_template('dashboard.html',context=context,title=title,app_names=apps)
|
|
|
|
return render_template('dashboard.html',context=context,title=title,app_names=apps)
|
|
|
|
|
|
|
|
|
|
|
|
def update_plan(uid,plan,auid=None):
|
|
|
|
def update_plan(uid,plan,auid=None):
|
|
|
|
url = ":protocol://:host/shop/subscribe/smart-top"
|
|
|
|
url = ":protocol://:host/store/subscribe/smart-top"
|
|
|
|
url = url.replace(":protocol",CONFIG['protocol']).replace(":host",CONFIG['api'])
|
|
|
|
url = url.replace(":protocol",CONFIG['protocol']).replace(":host",CONFIG['api'])
|
|
|
|
try:
|
|
|
|
try:
|
|
|
|
args = {"type":SYS_STORE['class']['read'],"args":SYS_STORE['args']}
|
|
|
|
args = {"type":SYS_STORE['class']['read'],"args":SYS_STORE['args']}
|
|
|
@ -99,8 +99,11 @@ def update_plan(uid,plan,auid=None):
|
|
|
|
headers['pid'] = plan
|
|
|
|
headers['pid'] = plan
|
|
|
|
if auid is not None:
|
|
|
|
if auid is not None:
|
|
|
|
headers["auid"]=json.dumps([auid])
|
|
|
|
headers["auid"]=json.dumps([auid])
|
|
|
|
r = requests.post(url,headers=headers)
|
|
|
|
httpclient = requests.session()
|
|
|
|
|
|
|
|
r = httpclient.post(url,headers=headers)
|
|
|
|
|
|
|
|
#r = requests.post(url,headers=headers)
|
|
|
|
|
|
|
|
print url
|
|
|
|
|
|
|
|
print [r.text,r.status_code]
|
|
|
|
return json.loads( r.text)
|
|
|
|
return json.loads( r.text)
|
|
|
|
|
|
|
|
|
|
|
|
except Exception,e:
|
|
|
|
except Exception,e:
|
|
|
@ -146,7 +149,6 @@ def register() :
|
|
|
|
|
|
|
|
|
|
|
|
plans = update_plan(uid,plan)
|
|
|
|
plans = update_plan(uid,plan)
|
|
|
|
key = reader.view('users/uid_map',key=uid)
|
|
|
|
key = reader.view('users/uid_map',key=uid)
|
|
|
|
|
|
|
|
|
|
|
|
if 'key' not in session :
|
|
|
|
if 'key' not in session :
|
|
|
|
args = {"type":SYS_STORE['class']['write'],"args":SYS_STORE['args']}
|
|
|
|
args = {"type":SYS_STORE['class']['write'],"args":SYS_STORE['args']}
|
|
|
|
args['args']['uid'] = key
|
|
|
|
args['args']['uid'] = key
|
|
|
|