Exemplo n.º 1
0
    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
            })
Exemplo n.º 2
0
 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})
Exemplo n.º 3
0
 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"
Exemplo n.º 4
0
    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
            })
Exemplo n.º 5
0
    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
            })
Exemplo n.º 6
0
 def index(self):
     return render('/hello.mako')
Exemplo n.º 7
0
 def index(self):
     return render('/feedtpl.mako')
Exemplo n.º 8
0
 def ApplyPublishList(self):
     return render('/apply-publish-list.mako')
Exemplo n.º 9
0
 def ApplyNewFeed(self):
     return render('/apply-new-feed.mako')
Exemplo n.º 10
0
 def ApplyNewTplList(self):
     return render('/apply-new-tpl-list.mako')
Exemplo n.º 11
0
 def ApplyRollbackList(self):
     return render('/apply-rollback-list.mako')
Exemplo n.º 12
0
 def ApplyNewFeedList(self):
     return render('/apply-new-feed-list.mako')
Exemplo n.º 13
0
 def ApplyNewVersionList(self):
     return render('/apply-new-version-list.mako')
Exemplo n.º 14
0
    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})
Exemplo n.º 15
0
 def ApplyNewVersion(self):
     return render('/apply-new-version.mako')
Exemplo n.º 16
0
 def ApplyNewTpl(self):
     return render('/apply-new-tpl.mako')
Exemplo n.º 17
0
 def ApplyPublish(self):
     return render('/apply-publish.mako')
Exemplo n.º 18
0
 def ApplyRollback(self):
     return render('/apply-rollback.mako')