#!/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: 1.0rc1
 Generation time: Wed Nov  2 13:28:50 2005
   Source file: src/Templates/SkeletonPage.tmpl
   Source file last modified: Mon Oct  7 11:37:30 2002
"""

__CHEETAH_genTime__ = 'Wed Nov  2 13:28:50 2005'
__CHEETAH_src__ = 'src/Templates/SkeletonPage.tmpl'
__CHEETAH_version__ = '1.0rc1'

##################################################
## 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, valueFromFrameOrSearchList
from Cheetah.CacheRegion import CacheRegion
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)
VFFSL=valueFromFrameOrSearchList
VFSL=valueFromSearchList
VFN=valueForName
currentTime=time.time

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

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

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


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

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

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


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

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

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


        """
        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 = False
        region = self._cacheRegions.get('header')
        if not region:
            region = CacheRegion()
            self._cacheRegions['header'] = region
            RECACHE = True
        cache = region.getCache('header')
        if RECACHE or not cache.getData():
            orig_trans = trans
            trans = cacheCollector = DummyTransaction()
            write = cacheCollector.response().write
            write(filter(VFSL([locals()]+SL+[globals(), __builtin__],"docType",True), rawExpr='$docType')) # from line 7, col 1.
            write('\n')
            write(filter(VFSL([locals()]+SL+[globals(), __builtin__],"htmlTag",True), 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(VFSL([locals()]+SL+[globals(), __builtin__],"currentYr",True), rawExpr='$currentYr')) # from line 12, col 11.
            write(' - ')
            write(filter(VFSL([locals()]+SL+[globals(), __builtin__],"siteCopyrightName",True), 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(VFSL([locals()]+SL+[globals(), __builtin__],"siteDomainName",True), rawExpr='$siteDomainName')) # from line 14, col 52.
            write('''
However, please do not copy any content or images without permission.

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

-->


''')
            self.writeHeadTag(trans=trans)
            write('\n')
            trans = orig_trans
            write = trans.response().write
            cache.setData(cacheCollector.response().getvalue())
            del cacheCollector
        write(cache.getData())
        ## END CACHE REGION
        
        write('\n')
        write(filter(VFSL([locals()]+SL+[globals(), __builtin__],"bodyTag",True), rawExpr='$bodyTag')) # from line 34, col 1.
        write('\n\n')
        self.writeBody(trans=trans)
        write('''
</body>
</html>



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


    __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()

