Logo Search packages:      
Sourcecode: karrigell version File versions  Download package

SkeletonPage.py

#!/usr/bin/env python

"""A Skeleton HTML page template, that provides basic structure and utility methods.

Autogenerated by CHEETAH: The Python-Powered Template Engine
 CHEETAH VERSION: 0.9.15a1
 Generation time: Mon Oct  7 11:37:55 2002
   Source file: SkeletonPage.tmpl
   Source file last modified: Mon Oct  7 11:37:30 2002
"""

__CHEETAH_genTime__ = 'Mon Oct  7 11:37:55 2002'
__CHEETAH_src__ = 'SkeletonPage.tmpl'
__CHEETAH_version__ = '0.9.15a1'

##################################################
## DEPENDENCIES

import sys
import os
import os.path
from os.path import getmtime, exists
import time
import types
import __builtin__
from Cheetah.Template import Template
from Cheetah.DummyTransaction import DummyTransaction
from Cheetah.NameMapper import NotFound, valueForName, valueFromSearchList
import Cheetah.Filters as Filters
import Cheetah.ErrorCatchers as ErrorCatchers
from Cheetah.Templates._SkeletonPage import _SkeletonPage

##################################################
## MODULE CONSTANTS

try:
    True, False
except NameError:
    True, False = (1==1), (1==0)
VFS=valueFromSearchList
VFN=valueForName
currentTime=time.time

##################################################
## CLASSES

00047 class SkeletonPage(_SkeletonPage):
    """
    
    Autogenerated by CHEETAH: The Python-Powered Template Engine
    """

    ##################################################
    ## GENERATED METHODS


00057     def __init__(self, *args, **KWs):
        """
        
        """

        _SkeletonPage.__init__(self, *args, **KWs)

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


        """
        Generated from #block writeHeadTag at line 22, 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('<head>\n<title>')
        write(filter(VFS(SL + [globals(), __builtin__],"title",1), rawExpr='$title')) # from line 24, col 8.
        write('</title>\n')
        write(filter(VFS(SL + [globals(), __builtin__],"metaTags",1), rawExpr='$metaTags')) # from line 25, col 1.
        write(' \n')
        write(filter(VFS(SL + [globals(), __builtin__],"stylesheetTags",1), rawExpr='$stylesheetTags')) # from line 26, col 1.
        write(' \n')
        write(filter(VFS(SL + [globals(), __builtin__],"javascriptTags",1), rawExpr='$javascriptTags')) # from line 27, col 1.
        write('\n</head>\n')
        
        ########################################
        ## END - generated method body
        
        if dummyTrans:
            return trans.response().getvalue()
        else:
            return ""
        

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


        """
        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 ""
        

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


        """
        This is the main method generated by Cheetah
        """

        if not trans:
            trans = DummyTransaction()
            dummyTrans = True
        write = trans.response().write
        SL = self._searchList
        filter = self._currentFilter
        globalSetVars = self._globalSetVars
        
        ########################################
        ## START - generated method body
        
        ## START CACHE REGION: at line, col (6, 1) in the source.
        RECACHE = True
        if not self._cacheData.has_key('56424669'):
            self._cacheIndex['header'] = '56424669'
            pass
        else:
            RECACHE = False
        if RECACHE:
            orig_trans = trans
            trans = cacheCollector = DummyTransaction()
            write = cacheCollector.response().write
            write(filter(VFS(SL + [globals(), __builtin__],"docType",1), rawExpr='$docType')) # from line 7, col 1.
            write('\n')
            write(filter(VFS(SL + [globals(), __builtin__],"htmlTag",1), rawExpr='$htmlTag')) # from line 8, col 1.
            write('''
<!-- This document was autogenerated by Cheetah(http://CheetahTemplate.org). 
Do not edit it directly!

Copyright ''')
            write(filter(VFS(SL + [globals(), __builtin__],"currentYr",1), rawExpr='$currentYr')) # from line 12, col 11.
            write(' - ')
            write(filter(VFS(SL + [globals(), __builtin__],"siteCopyrightName",1), rawExpr='$siteCopyrightName')) # from line 12, col 24.
            write(' - All Rights Reserved.\nFeel free to copy any javascript or html you like on this site,\nprovided you remove all links and/or references to ')
            write(filter(VFS(SL + [globals(), __builtin__],"siteDomainName",1), rawExpr='$siteDomainName')) # from line 14, col 52.
            write('''
However, please do not copy any content or images without permission.

''')
            write(filter(VFS(SL + [globals(), __builtin__],"siteCredits",1), rawExpr='$siteCredits')) # from line 17, col 1.
            write('''

-->


''')
            self.writeHeadTag(trans=trans) # generated from ('writeHeadTag', '#block writeHeadTag') at line 22, col 1.
            write('\n')
            trans = orig_trans
            write = trans.response().write
            self._cacheData['56424669'] = cacheCollector.response().getvalue()
            del cacheCollector
        write(self._cacheData['56424669'])
        ## END CACHE REGION
        
        write('\n')
        write(filter(VFS(SL + [globals(), __builtin__],"bodyTag",1), rawExpr='$bodyTag')) # from line 34, col 1.
        write('\n\n')
        self.writeBody(trans=trans) # generated from ('writeBody', '#block writeBody') at line 36, col 1.
        write('''
</body>
</html>



''')
        
        ########################################
        ## END - generated method body
        
        if dummyTrans:
            return trans.response().getvalue()
        else:
            return ""
        
    ##################################################
    ## GENERATED ATTRIBUTES


00243     __str__ = respond

    _mainCheetahMethod_for_SkeletonPage= 'respond'


# CHEETAH was developed by Tavis Rudd, Mike Orr, Ian Bicking and Chuck Esterbrook;
# with code, advice and input from many other volunteers.
# For more information visit http://www.CheetahTemplate.org

##################################################
## if run from command line:
if __name__ == '__main__':
    SkeletonPage().runAsMainProgram()


Generated by  Doxygen 1.6.0   Back to index