def Add(self, dict): obj = self.ToObj(dict) session = DbSession() session.add(obj) session.commit() id = obj.Id session.close() return id
def Add(str, curtime): token = Token() token.Access_token = str token.Time = curtime session = DbSession() session.add(token) session.commit() session.close() if (1): print('token insert ok')