def index():
if request.method == 'GET':
r = requests.get(lookupaddr+'/topiclist')
topiclist = json.loads(r.content)
return render_template('index.html', topiclist=topiclist)
else:
with lock:
interest_list = request.form.getlist('adcat')
sid = str(request.headers.get('sid'))
client_dict[sid] = dict()
for interest in interest_list:
client_dict[sid][str(interest)] = dict()
print interest_list
return "subscribed!"
评论列表
文章目录