def FeedKeysEdit(self): stype = -1 version = -1 is_user = 0 apply_id = 0 from_tpl_id = 0 if "stype" in request.params: stype = int(request.params['stype']) if "version" in request.params: version = int(request.params['version']) if "apply_id" in request.params and "from_tpl_id" in request.params: apply_id = int(request.params['apply_id']) from_tpl_id = int(request.params['from_tpl_id']) if "is_user" in request.params: is_user = int(request.params['version']) return render( '/feed-keys-edit.mako', { "stype": stype, "version": version, "from_tpl_id": from_tpl_id, "apply_id": apply_id, "is_user": is_user })
def GetStypeTree(self): o = self.page_q.filter_by(id=int(request.params['id'])).first() value = '' if o: value = o.key_list keys = value.split(',') return render('/get-stype-tree.mako', {'keys': keys})
def FeedTplEdit(self): stype = -1 version = -1 tpl_id = -1 if "stype" in request.params: stype = int(request.params['stype']) if "version" in request.params: version = int(request.params['version']) if "tpl_id" in request.params: tpl_id = int(request.params['tpl_id']) return render('/feed-tpl-edit.mako', { "stype": stype, "version": version, "tpl_id": tpl_id }) return "xxx"
def StypeConfigEdit(self): stype = -1 from_version_id = 0 apply_id = 0 if "stype" in request.params: stype = int(request.params['stype']) if "apply_id" in request.params and "from_version_id" in request.params: apply_id = int(request.params['apply_id']) from_version_id = int(request.params['from_version_id']) return render( '/feed-config-edit.mako', { "stype": stype, "apply_id": apply_id, "from_version_id": from_version_id })
def GetStypeConfig(self): cfg = self.stype_config_.filter_by( stype=int(request.params['stype'])).first() if not cfg: cfg = StypeConfig(stype=int(request.params['stype']), weight=1, type=int(request.params['stype']) / 100, ptype=0, description='', push_feed_flags=0, news_merge_type=0, mini_merge_type=0, update_time_on_merge=0, custom_expr=0, persist_body=0, persist_feeddb=0, lifetime=0, daily_quota=0, news_merge_by='', mini_merge_by='', source_by='', psource_by='', actor_by='', dispatch_expr='') return render( '/feed-config.mako', { "stype": cfg.stype, "type": cfg.type, "weight": cfg.weight, "desc": cfg.description, "ptype": cfg.ptype, "save_content": cfg.is_persist_content, "save_feed_db": cfg.is_persist_feeddb, "news_merge_type": cfg.news_merge_type, "mini_merge_type": cfg.mini_merge_type, "push_flags": cfg.push_flag, "custom_expr": cfg.is_custom_expr, "update_time_on_merge": cfg.is_update_time, "lifetime": cfg.lifetime, "daily_quota": cfg.daily_quota })
def index(self): return render('/hello.mako')
def index(self): return render('/feedtpl.mako')
def ApplyPublishList(self): return render('/apply-publish-list.mako')
def ApplyNewFeed(self): return render('/apply-new-feed.mako')
def ApplyNewTplList(self): return render('/apply-new-tpl-list.mako')
def ApplyRollbackList(self): return render('/apply-rollback-list.mako')
def ApplyNewFeedList(self): return render('/apply-new-feed-list.mako')
def ApplyNewVersionList(self): return render('/apply-new-version-list.mako')
def StypeConfigCreate(self): apply_id = 0 if "apply_id" in request.params: apply_id = int(request.params['apply_id']) return render('/feed-config-create.mako', {"apply_id": apply_id})
def ApplyNewVersion(self): return render('/apply-new-version.mako')
def ApplyNewTpl(self): return render('/apply-new-tpl.mako')
def ApplyPublish(self): return render('/apply-publish.mako')
def ApplyRollback(self): return render('/apply-rollback.mako')