|
|
|
@ -88,7 +88,7 @@ def home():
|
|
|
|
|
return render_template('dashboard.html',context=context,title=title,app_names=apps)
|
|
|
|
|
|
|
|
|
|
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'])
|
|
|
|
|
try:
|
|
|
|
|
args = {"type":SYS_STORE['class']['read'],"args":SYS_STORE['args']}
|
|
|
|
@ -99,8 +99,11 @@ def update_plan(uid,plan,auid=None):
|
|
|
|
|
headers['pid'] = plan
|
|
|
|
|
if auid is not None:
|
|
|
|
|
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)
|
|
|
|
|
|
|
|
|
|
except Exception,e:
|
|
|
|
@ -146,7 +149,6 @@ def register() :
|
|
|
|
|
|
|
|
|
|
plans = update_plan(uid,plan)
|
|
|
|
|
key = reader.view('users/uid_map',key=uid)
|
|
|
|
|
|
|
|
|
|
if 'key' not in session :
|
|
|
|
|
args = {"type":SYS_STORE['class']['write'],"args":SYS_STORE['args']}
|
|
|
|
|
args['args']['uid'] = key
|
|
|
|
|