当前位置: 首页>>代码示例>>Python>>正文


Python DummyTransaction.DummyTransaction类代码示例

本文整理汇总了Python中Cheetah.DummyTransaction.DummyTransaction的典型用法代码示例。如果您正苦于以下问题:Python DummyTransaction类的具体用法?Python DummyTransaction怎么用?Python DummyTransaction使用的例子?那么恭喜您, 这里精选的类代码示例或许可以为您提供帮助。


在下文中一共展示了DummyTransaction类的15个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的Python代码示例。

示例1: pagetitle

    def pagetitle(self, **KWS):

        ## CHEETAH: generated from #def pagetitle at line 4, col 1.
        trans = KWS.get("trans")
        if not trans and not self._CHEETAH__isBuffering and not callable(self.transaction):
            trans = self.transaction  # is None unless self.awake() was called
        if not trans:
            trans = DummyTransaction()
            _dummyTrans = True
        else:
            _dummyTrans = False
        write = trans.response().write
        SL = self._CHEETAH__searchList
        _filter = self._CHEETAH__currentFilter

        ########################################
        ## START - generated method body

        write("""Editing a copy of """)
        _v = VFFSL(SL, "book.title.booktitle", True)  # '${book.title.booktitle}' on line 5, col 19
        if _v is not None:
            write(_filter(_v, rawExpr="${book.title.booktitle}"))  # from line 5, col 19.
        write(
            """
"""
        )

        ########################################
        ## END - generated method body

        return _dummyTrans and trans.response().getvalue() or ""
开发者ID:johm,项目名称:infoshopkeeper,代码行数:31,代码来源:BookEditTemplate.py

示例2: pagetitle

    def pagetitle(self, **KWS):



        ## CHEETAH: generated from #def pagetitle at line 4, col 1.
        trans = KWS.get("trans")
        if (not trans and not self._CHEETAH__isBuffering and not callable(self.transaction)):
            trans = self.transaction # is None unless self.awake() was called
        if not trans:
            trans = DummyTransaction()
            _dummyTrans = True
        else: _dummyTrans = False
        write = trans.response().write
        SL = self._CHEETAH__searchList
        _filter = self._CHEETAH__currentFilter
        
        ########################################
        ## START - generated method body
        
        write('''Report: ''')
        _v = VFN(VFFSL(SL,"report",True),"metadata",True)['name'] # "${report.metadata['name']}" on line 5, col 9
        if _v is not None: write(_filter(_v, rawExpr="${report.metadata['name']}")) # from line 5, col 9.
        write('''
''')
        
        ########################################
        ## END - generated method body
        
        return _dummyTrans and trans.response().getvalue() or ""
开发者ID:aliceriot,项目名称:infoshopkeeper,代码行数:29,代码来源:ReportTemplate.py

示例3: respond

    def respond(self, trans=None):



        ## CHEETAH: main method generated for this template
        if (not trans and not self._CHEETAH__isBuffering and not callable(self.transaction)):
            trans = self.transaction # is None unless self.awake() was called
        if not trans:
            trans = DummyTransaction()
            _dummyTrans = True
        else: _dummyTrans = False
        write = trans.response().write
        SL = self._CHEETAH__searchList
        _filter = self._CHEETAH__currentFilter
        
        ########################################
        ## START - generated method body
        
        _v = VFFSL(SL,"req.output",True) # '$req.output' on line 1, col 1
        if _v is not None: write(_filter(_v, rawExpr='$req.output')) # from line 1, col 1.
        
        ########################################
        ## END - generated method body
        
        return _dummyTrans and trans.response().getvalue() or ""
开发者ID:lzimm,项目名称:pervurs,代码行数:25,代码来源:index.py

示例4: writeBody

    def writeBody(self, **KWS):



        ## CHEETAH: main method generated for this template
        trans = KWS.get("trans")
        if (not trans and not self._CHEETAH__isBuffering and not callable(self.transaction)):
            trans = self.transaction # is None unless self.awake() was called
        if not trans:
            trans = DummyTransaction()
            _dummyTrans = True
        else: _dummyTrans = False
        write = trans.response().write
        SL = self._CHEETAH__searchList
        _filter = self._CHEETAH__currentFilter
        
        ########################################
        ## START - generated method body
        
        write('''
''')
        self.body(trans=trans)
        
        ########################################
        ## END - generated method body
        
        return _dummyTrans and trans.response().getvalue() or ""
开发者ID:lzimm,项目名称:pervurs,代码行数:27,代码来源:index.py

示例5: body

    def body(self, **KWS):



        ## CHEETAH: generated from #def body at line 8, col 1.
        trans = KWS.get("trans")
        if (not trans and not self._CHEETAH__isBuffering and not callable(self.transaction)):
            trans = self.transaction # is None unless self.awake() was called
        if not trans:
            trans = DummyTransaction()
            _dummyTrans = True
        else: _dummyTrans = False
        write = trans.response().write
        SL = self._CHEETAH__searchList
        _filter = self._CHEETAH__currentFilter
        
        ########################################
        ## START - generated method body
        
        write('''<h1>Category record for ''')
        _v = VFFSL(SL,"category.title.booktitle",True) # '$category.title.booktitle' on line 9, col 25
        if _v is not None: write(_filter(_v, rawExpr='$category.title.booktitle')) # from line 9, col 25.
        write('''</h1>
<form method="get" action="/categoryedit">
''')
        _v = VFFSL(SL,"category.object_to_form",True) # '$category.object_to_form' on line 11, col 1
        if _v is not None: write(_filter(_v, rawExpr='$category.object_to_form')) # from line 11, col 1.
        write('''
</form>
''')
        
        ########################################
        ## END - generated method body
        
        return _dummyTrans and trans.response().getvalue() or ""
开发者ID:aliceriot,项目名称:infoshopkeeper,代码行数:35,代码来源:CategoryEditTemplate.py

示例6: writeBody

    def writeBody(self,
            trans=None,
            dummyTrans=False,
            VFFSL=valueFromFrameOrSearchList,
            VFN=valueForName,
            getmtime=getmtime,
            currentTime=time.time):


        """
        Generated from #block writeBody at line 36, col 1.
        """

        if not trans:
            trans = DummyTransaction()
            dummyTrans = True
        write = trans.response().write
        SL = self._searchList
        filter = self._currentFilter
        globalSetVars = self._globalSetVars
        
        ########################################
        ## START - generated method body
        
        write('This skeleton page has no flesh. Its body needs to be implemented.\n')
        
        ########################################
        ## END - generated method body
        
        if dummyTrans:
            return trans.response().getvalue()
        else:
            return ""
开发者ID:thraxil,项目名称:gtreed,代码行数:33,代码来源:SkeletonPage.py

示例7: banner

    def banner(self, **KWS):



        ## CHEETAH: generated from #def banner at line 12, col 1.
        trans = KWS.get("trans")
        if (not trans and not self._CHEETAH__isBuffering and not callable(self.transaction)):
            trans = self.transaction # is None unless self.awake() was called
        if not trans:
            trans = DummyTransaction()
            _dummyTrans = True
        else: _dummyTrans = False
        write = trans.response().write
        SL = self._CHEETAH__searchList
        _filter = self._CHEETAH__currentFilter
        
        ########################################
        ## START - generated method body
        
        _v = VFFSL(SL,"title",True) # '$title' on line 13, col 1
        if _v is not None: write(_filter(_v, rawExpr='$title')) # from line 13, col 1.
        write('''
''')
        
        ########################################
        ## END - generated method body
        
        return _dummyTrans and trans.response().getvalue() or ""
开发者ID:abshkd,项目名称:eve-central.com,代码行数:28,代码来源:corpbase.py

示例8: side

    def side(self, **KWS):



        ## CHEETAH: generated from #block side at line 46, col 1.
        trans = KWS.get("trans")
        if (not trans and not self._CHEETAH__isBuffering and not callable(self.transaction)):
            trans = self.transaction # is None unless self.awake() was called
        if not trans:
            trans = DummyTransaction()
            _dummyTrans = True
        else: _dummyTrans = False
        write = trans.response().write
        SL = self._CHEETAH__searchList
        _filter = self._CHEETAH__currentFilter
        
        ########################################
        ## START - generated method body
        
        self._handleCheetahInclude("../server/www/templates/chunks/side.tmpl", trans=trans, includeFrom="file", raw=False)
        
        ########################################
        ## END - generated method body
        
        return _dummyTrans and trans.response().getvalue() or ""
开发者ID:lzimm,项目名称:pervurs,代码行数:25,代码来源:site.py

示例9: writeBody

    def writeBody(self, **KWS):



        ## CHEETAH: generated from #block writeBody at line 36, col 1.
        trans = KWS.get("trans")
        if (not trans and not self._CHEETAH__isBuffering and not callable(self.transaction)):
            trans = self.transaction # is None unless self.awake() was called
        if not trans:
            trans = DummyTransaction()
            _dummyTrans = True
        else: _dummyTrans = False
        write = trans.response().write
        SL = self._CHEETAH__searchList
        _filter = self._CHEETAH__currentFilter
        
        ########################################
        ## START - generated method body
        
        write('This skeleton page has no flesh. Its body needs to be implemented.\n')
        
        ########################################
        ## END - generated method body
        
        return _dummyTrans and trans.response().getvalue() or ""
开发者ID:resa89,项目名称:imusite,代码行数:25,代码来源:SkeletonPage.py

示例10: title

    def title(self, **KWS):



        ## CHEETAH: generated from #def title at line 8, col 1.
        trans = KWS.get("trans")
        if (not trans and not self._CHEETAH__isBuffering and not callable(self.transaction)):
            trans = self.transaction # is None unless self.awake() was called
        if not trans:
            trans = DummyTransaction()
            _dummyTrans = True
        else: _dummyTrans = False
        write = trans.response().write
        SL = self._CHEETAH__searchList
        _filter = self._CHEETAH__currentFilter
        
        ########################################
        ## START - generated method body
        
        write('''Untitled
''')
        
        ########################################
        ## END - generated method body
        
        return _dummyTrans and trans.response().getvalue() or ""
开发者ID:abshkd,项目名称:eve-central.com,代码行数:26,代码来源:corpbase.py

示例11: body

    def body(self, **KWS):



        ## CHEETAH: generated from #block body at line 19, col 1.
        trans = KWS.get("trans")
        if (not trans and not self._CHEETAH__isBuffering and not callable(self.transaction)):
            trans = self.transaction # is None unless self.awake() was called
        if not trans:
            trans = DummyTransaction()
            _dummyTrans = True
        else: _dummyTrans = False
        write = trans.response().write
        SL = self._CHEETAH__searchList
        _filter = self._CHEETAH__currentFilter
        
        ########################################
        ## START - generated method body
        
        write('''
''')
        #  Show error if this page is shown
        write('''<h1><center><font color="RED">
OOOPS!
</font></center></h1>

''')
        
        ########################################
        ## END - generated method body
        
        return _dummyTrans and trans.response().getvalue() or ""
开发者ID:carvalhomb,项目名称:tsmells,代码行数:32,代码来源:master.py

示例12: body

    def body(self,
            trans=None,
            dummyTrans=False,
            VFS=valueFromSearchList,
            VFN=valueForName,
            getmtime=getmtime,
            currentTime=time.time,
            globals=globals,
            locals=locals,
            __builtin__=__builtin__):


        """
        Generated from #block body at line 12, col 1.
        """

        if not trans:
            trans = DummyTransaction()
            dummyTrans = True
        write = trans.response().write
        SL = self._searchList
        filter = self._currentFilter
        globalSetVars = self._globalSetVars
        
        ########################################
        ## START - generated method body
        
        
        ########################################
        ## END - generated method body
        
        if dummyTrans:
            return trans.response().getvalue()
        else:
            return ""
开发者ID:codehaus,项目名称:boo,代码行数:35,代码来源:CSharpTemplate.py

示例13: respond

    def respond(self, trans=None):



        ## CHEETAH: main method generated for this template
        if (not trans and not self._CHEETAH__isBuffering and not callable(self.transaction)):
            trans = self.transaction # is None unless self.awake() was called
        if not trans:
            trans = DummyTransaction()
            _dummyTrans = True
        else: _dummyTrans = False
        write = trans.response().write
        SL = self._CHEETAH__searchList
        _filter = self._CHEETAH__currentFilter
        
        ########################################
        ## START - generated method body
        
        #  Master page template
        write('''
''')
        #  Header
        write('''<html>
<head>
<title>
TSmells Pieces Tests
</title>
<head>
<body>
<center>
<h1>
TSmells Pieces Tests
</h1>
</center>

''')
        #  Body
        self.body(trans=trans)
        write('''
''')
        #  Footer
        write('''<hr />
    <font size="-1">
        Generated ''')
        _v = VFFSL(SL,"ctime",False)() # '$ctime()' on line 31, col 19
        if _v is not None: write(_filter(_v, rawExpr='$ctime()')) # from line 31, col 19.
        write(''' by <a href="mailto:[email protected]">Manuel Breugelmans</a>
    </font>
</body>
''')
        
        ########################################
        ## END - generated method body
        
        return _dummyTrans and trans.response().getvalue() or ""
开发者ID:carvalhomb,项目名称:tsmells,代码行数:55,代码来源:master.py

示例14: respond

    def respond(self, trans=None):



        ## CHEETAH: main method generated for this template
        if (not trans and not self._CHEETAH__isBuffering and not callable(self.transaction)):
            trans = self.transaction # is None unless self.awake() was called
        if not trans:
            trans = DummyTransaction()
            _dummyTrans = True
        else: _dummyTrans = False
        write = trans.response().write
        SL = self._CHEETAH__searchList
        _filter = self._CHEETAH__currentFilter
        
        ########################################
        ## START - generated method body
        
        write('''
<div class="pagination">
''')
        if VFN(VFFSL(SL,"req.__dict__",True),"get",False)('pagination'): # generated from line 4, col 1
            write('''
''')
            if VFN(VFFSL(SL,"req.pagination",True),"fetchcount",False)(True): # generated from line 6, col 1
                write('''
<a class="more" href="''')
                _v = VFFSL(SL,"links",True)['paginate_more'](VFFSL(SL,"req",True)) # "$links['paginate_more']($req)" on line 8, col 23
                if _v is not None: write(_filter(_v, rawExpr="$links['paginate_more']($req)")) # from line 8, col 23.
                write('''">More</a>

''')
            write('''\t
''')
            if VFFSL(SL,"req.pagination.offset",True): # generated from line 12, col 1
                write('''
<a class="less" href="''')
                _v = VFFSL(SL,"links",True)['paginate_less'](VFFSL(SL,"req",True)) # "$links['paginate_less']($req)" on line 14, col 23
                if _v is not None: write(_filter(_v, rawExpr="$links['paginate_less']($req)")) # from line 14, col 23.
                write('''">Less</a>

''')
            write('''
''')
        write('''</div>''')
        
        ########################################
        ## END - generated method body
        
        return _dummyTrans and trans.response().getvalue() or ""
开发者ID:lzimm,项目名称:pervurs,代码行数:50,代码来源:pagination.py

示例15: body

    def body(self, **KWS):



        ## CHEETAH: generated from #block body at line 3, col 1.
        trans = KWS.get("trans")
        if (not trans and not self._CHEETAH__isBuffering and not callable(self.transaction)):
            trans = self.transaction # is None unless self.awake() was called
        if not trans:
            trans = DummyTransaction()
            _dummyTrans = True
        else: _dummyTrans = False
        write = trans.response().write
        SL = self._CHEETAH__searchList
        _filter = self._CHEETAH__currentFilter
        
        ########################################
        ## START - generated method body
        
        write('''
<div class="form">
<form action="''')
        _v = VFFSL(SL,"req.uri",True) # '$req.uri' on line 6, col 15
        if _v is not None: write(_filter(_v, rawExpr='$req.uri')) # from line 6, col 15.
        write('''" method="POST">
    <div class="row textfields">
        <div class="column">
            <label for="email">Email</label>
            <input name="email" type="text" />
        </div>
    
        <div class="column">
            <label for="password">Password</label>
            <input name="password" type="password" />
        </div>
    </div>
    
    <div class="row"><div class="column">
    <input type="submit" />
    </div></div>
    
</form>
</div>

''')
        
        ########################################
        ## END - generated method body
        
        return _dummyTrans and trans.response().getvalue() or ""
开发者ID:lzimm,项目名称:pervurs,代码行数:50,代码来源:login.py


注:本文中的Cheetah.DummyTransaction.DummyTransaction类示例由纯净天空整理自Github/MSDocs等开源代码及文档管理平台,相关代码片段筛选自各路编程大神贡献的开源项目,源码版权归原作者所有,传播和使用请参考对应项目的License;未经允许,请勿转载。