def POST(self): #添加自定义RSS user = self.getcurrentuser() title = web.input().get('t') url = web.input().get('url') isfulltext = int(bool(web.input().get('full'))) if not title or not url: return self.GET('title or url is empty!') #添加 model.put_feed(title, url, isfulltext) raise web.seeother('/my')
def POST(self):#添加自定义RSS user = self.getcurrentuser() title = web.input().get('t') url = web.input().get('url') isfulltext = int(bool(web.input().get('full'))) if not title or not url: return self.GET('title or url is empty!') #添加 model.put_feed(title,url,isfulltext) raise web.seeother('/my')
def POST(self): #添加自定义RSS user = self.getcurrentuser() title = web.input().get('t') url = web.input().get('url') isfulltext = int(bool(web.input().get('full'))) description = web.input().get('descrip') category = int(web.input().get('category')) update_cycle = web.input().get('up_t') if update_cycle == '': update_cycle = 6 else: update_cycle = int(update_cycle) if not title or not url: return self.GET('title or url is empty!') #添加 id = model.put_feed(title, url, isfulltext, description, category, update_cycle) if id != -1: #创建文件夹 ROOT = path.dirname(path.abspath(__file__)) output_dir = path.join(ROOT, 'temp') #%s' % id output_dir = path.join(output_dir, 'feed_%s' % id) isExists = path.exists(output_dir) if not isExists: os.makedirs(output_dir) raise web.seeother('/my')
def POST(self):#添加自定义RSS user = self.getcurrentuser() title = web.input().get('t') url = web.input().get('url') isfulltext = int(bool(web.input().get('full'))) description = web.input().get('descrip') category = int(web.input().get('category')) update_cycle = web.input().get('up_t') if update_cycle == '': update_cycle = 6 else: update_cycle = int(update_cycle) if not title or not url: return self.GET('title or url is empty!') #添加 id = model.put_feed(title,url,isfulltext,description,category,update_cycle) if id != -1: #创建文件夹 ROOT = path.dirname(path.abspath(__file__)) output_dir = path.join(ROOT, 'temp')#%s' % id output_dir = path.join(output_dir,'feed_%s' % id) isExists = path.exists(output_dir) if not isExists: os.makedirs(output_dir) raise web.seeother('/my')