~ubuntu-branches/ubuntu/saucy/prewikka/saucy-proposed

« back to all changes in this revision

Viewing changes to prewikka/templates/HTMLDocument.py

  • Committer: Bazaar Package Importer
  • Author(s): Pierre Chifflier
  • Date: 2010-03-18 17:34:33 UTC
  • mfrom: (1.1.13 upstream)
  • Revision ID: james.westby@ubuntu.com-20100318173433-aut3wpew3co78xwn
Tags: 1.0.0-1
New upstream release 1.0.0

Show diffs side-by-side

added added

removed removed

Lines of Context:
8
8
import sys
9
9
import os
10
10
import os.path
 
11
import __builtin__
11
12
from os.path import getmtime, exists
12
13
import time
13
14
import types
14
 
import __builtin__
15
15
from Cheetah.Version import MinCompatibleVersion as RequiredCheetahVersion
16
16
from Cheetah.Version import MinCompatibleVersionTuple as RequiredCheetahVersionTuple
17
17
from Cheetah.Template import Template
18
 
from Cheetah.DummyTransaction import DummyTransaction
 
18
from Cheetah.DummyTransaction import *
19
19
from Cheetah.NameMapper import NotFound, valueForName, valueFromSearchList, valueFromFrameOrSearchList
20
20
from Cheetah.CacheRegion import CacheRegion
21
21
import Cheetah.Filters as Filters
23
23
 
24
24
##################################################
25
25
## MODULE CONSTANTS
26
 
try:
27
 
    True, False
28
 
except NameError:
29
 
    True, False = (1==1), (1==0)
30
26
VFFSL=valueFromFrameOrSearchList
31
27
VFSL=valueFromSearchList
32
28
VFN=valueForName
33
29
currentTime=time.time
34
 
__CHEETAH_version__ = '2.0.1'
35
 
__CHEETAH_versionTuple__ = (2, 0, 1, 'final', 0)
36
 
__CHEETAH_genTime__ = 1247473713.237993
37
 
__CHEETAH_genTimestamp__ = 'Mon Jul 13 10:28:33 2009'
 
30
__CHEETAH_version__ = '2.4.1'
 
31
__CHEETAH_versionTuple__ = (2, 4, 1, 'final', 0)
 
32
__CHEETAH_genTime__ = 1268930090.37431
 
33
__CHEETAH_genTimestamp__ = 'Thu Mar 18 17:34:50 2010'
38
34
__CHEETAH_src__ = 'prewikka/templates/HTMLDocument.tmpl'
39
 
__CHEETAH_srcLastModified__ = 'Fri Jul  3 17:01:01 2009'
40
 
__CHEETAH_docstring__ = 'Autogenerated by CHEETAH: The Python-Powered Template Engine'
 
35
__CHEETAH_srcLastModified__ = 'Tue Feb 23 17:14:18 2010'
 
36
__CHEETAH_docstring__ = 'Autogenerated by Cheetah: The Python-Powered Template Engine'
41
37
 
42
38
if __CHEETAH_versionTuple__ < RequiredCheetahVersionTuple:
43
39
    raise AssertionError(
56
52
 
57
53
    def __init__(self, *args, **KWs):
58
54
 
59
 
        Template.__init__(self, *args, **KWs)
 
55
        super(HTMLDocument, self).__init__(*args, **KWs)
60
56
        if not self._CHEETAH__instanceInitialized:
61
57
            cheetahKWArgs = {}
62
58
            allowedKWs = 'searchList namespaces filter filtersLib errorCatcher'.split()
109
105
        ########################################
110
106
        ## START - generated method body
111
107
        
112
 
        write('''<!DOCTYPE html PUBLIC \'-//W3C//DTD XHTML 1.0 Transitional//EN\' \'http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd\'>
 
108
        write(u'''<!DOCTYPE html PUBLIC \'-//W3C//DTD XHTML 1.0 Transitional//EN\' \'http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd\'>
113
109
 
114
110
<html xmlns="http://www.w3.org/1999/xhtml">
115
111
        <head>
116
112
                <title>''')
117
 
        _v = VFFSL(SL,"document.title",True) # '$document.title' on line 5, col 24
118
 
        if _v is not None: write(_filter(_v, rawExpr='$document.title')) # from line 5, col 24.
119
 
        write('''</title>
 
113
        _v = VFFSL(SL,"document.title",True) # u'$document.title' on line 5, col 24
 
114
        if _v is not None: write(_filter(_v, rawExpr=u'$document.title')) # from line 5, col 24.
 
115
        write(u'''</title>
120
116
                <meta http-equiv="Content-Type" content="text/html; charset=UTF-8" />
121
117
                <link rel="Shortcut Icon" href="prewikka/images/favicon.ico"/>
122
118
 
123
119
''')
124
120
        for css_file in VFFSL(SL,"document.css_files",True): # generated from line 9, col 17
125
 
            write('''                        <link rel="stylesheet" href="''')
126
 
            _v = VFFSL(SL,"css_file",True) # '$css_file' on line 10, col 54
127
 
            if _v is not None: write(_filter(_v, rawExpr='$css_file')) # from line 10, col 54.
128
 
            write('''" type="text/css"/>
 
121
            write(u'''                        <link rel="stylesheet" href="''')
 
122
            _v = VFFSL(SL,"css_file",True) # u'$css_file' on line 10, col 54
 
123
            if _v is not None: write(_filter(_v, rawExpr=u'$css_file')) # from line 10, col 54.
 
124
            write(u'''" type="text/css"/>
129
125
''')
130
 
        write('''
 
126
        write(u'''
131
127
''')
132
128
        for js_file in VFFSL(SL,"document.js_files",True): # generated from line 13, col 17
133
 
            write('''                        <script src="''')
134
 
            _v = VFFSL(SL,"js_file",True) # '$js_file' on line 14, col 38
135
 
            if _v is not None: write(_filter(_v, rawExpr='$js_file')) # from line 14, col 38.
136
 
            write('''" type="text/javascript"></script>
 
129
            write(u'''                        <script src="''')
 
130
            _v = VFFSL(SL,"js_file",True) # u'$js_file' on line 14, col 38
 
131
            if _v is not None: write(_filter(_v, rawExpr=u'$js_file')) # from line 14, col 38.
 
132
            write(u'''" type="text/javascript"></script>
137
133
''')
138
 
        write('''
 
134
        write(u'''
139
135
                ''')
140
 
        _v = VFFSL(SL,"head_extra_content",True) # '$head_extra_content' on line 19, col 17
141
 
        if _v is not None: write(_filter(_v, rawExpr='$head_extra_content')) # from line 19, col 17.
142
 
        write('''
 
136
        _v = VFFSL(SL,"head_extra_content",True) # u'$head_extra_content' on line 19, col 17
 
137
        if _v is not None: write(_filter(_v, rawExpr=u'$head_extra_content')) # from line 19, col 17.
 
138
        write(u'''
143
139
        </head>
144
140
        ''')
145
 
        _v = VFFSL(SL,"body",True) # '$body' on line 21, col 9
146
 
        if _v is not None: write(_filter(_v, rawExpr='$body')) # from line 21, col 9.
147
 
        write('''
 
141
        _v = VFFSL(SL,"body",True) # u'$body' on line 21, col 9
 
142
        if _v is not None: write(_filter(_v, rawExpr=u'$body')) # from line 21, col 9.
 
143
        write(u'''
148
144
</html>
149
145
''')
150
146