def post(self, id): id = int(id) txt = self.get_argument('txt', None) rt = self.get_argument('rt', None) title = self.get_argument('name', None) sync = self.get_argument('sync', None) po = RssPo.mc_get(id) po.txt = txt next = self.get_argument('next', None) or '/rss/index' if rt: po.state = RSS_RT_PO else: po.state = RSS_PRE_PO site = self.get_argument('site', None) if site: po.site_id = site if title: po.title = title po.save() if sync: site_sync_new(id) else: site_sync_rm(id) self.redirect(next)
def _edit(broad, sync, site, po, id): if broad: from model.po_recommend import po_recommend_new test_po = Po.get(rid=po.id, user_id=0, state=STATE_ACTIVE) if not test_po: po_recommend_new(po.id, 0, '') else: po_show_rm(po) if sync: site_sync_new(id) else: site_sync_rm(id) if site: po.zsite_id_set(site)
def _edit(broad, sync, site, po, id): if broad: from model.po_recommend import po_recommend_new test_po = Po.get(rid=po.id, user_id=0, state=STATE_ACTIVE) if not test_po: po_recommend_new(po.id, 0, "") else: po_show_rm(po) if sync: site_sync_new(id) else: site_sync_rm(id) if site: po.zsite_id_set(site)
def get(self, id): site_sync_rm(id) self.redirect('/po/show/set/%s' % id)
def get(self, id): site_sync_rm(id) self.redirect("/po/show/set/%s" % id)