def GET(self): p_model=Register.PostModel() print(session_data['user']) print("hi") if session_data['user']!=None: email=session_data['user']['Email'] data=[] p_model=Register.PostModel() data=p_model.Getpost(email) return render.HomeFeed(data) else: data=[] return render.HomeFeed(data)
def POST(self): data=web.input() model=Register.PostModel() result=model.DeletePost(data) if result: return "pass" else: return "fail"
def POST(self): data=web.input(); data.email=session_data['user']['Email'] data.user=session_data['user']['UserName'] c_model=Register.PostModel() result=c_model.insertComment(data) if result: return "pass" else: return "fail"
def POST(self): data=web.input() data.email=session_data['user']['Email'] p_model=Register.PostModel() p_model.AddPost(data) return "pass"