~ubuntu-branches/ubuntu/wily/prewikka/wily

« back to all changes in this revision

Viewing changes to prewikka/templates/HTMLDocument.py

  • Committer: Bazaar Package Importer
  • Author(s): Alessio Treglia
  • Date: 2009-07-08 08:33:50 UTC
  • mfrom: (1.1.9 upstream) (8.1.1 squeeze)
  • Revision ID: james.westby@ubuntu.com-20090708083350-zqmdq1l666lsv366
Tags: 0.9.17-1ubuntu1
* Merge from debian unstable, Ubuntu remaining changes:
  - debian/rules: Append --install-layout=deb to setup.py install arguments.
  - debian/control: Bump python-all-dev, python-central, debhelper build
    dependencies (as per New Policy).

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__
12
11
from os.path import getmtime, exists
13
12
import time
14
13
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 *
 
18
from Cheetah.DummyTransaction import DummyTransaction
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)
26
30
VFFSL=valueFromFrameOrSearchList
27
31
VFSL=valueFromSearchList
28
32
VFN=valueForName
29
33
currentTime=time.time
30
 
__CHEETAH_version__ = '2.2.1'
31
 
__CHEETAH_versionTuple__ = (2, 2, 1, 'final', 0)
32
 
__CHEETAH_genTime__ = 1244715456.591244
33
 
__CHEETAH_genTimestamp__ = 'Thu Jun 11 12:17:36 2009'
 
34
__CHEETAH_version__ = '2.0.1'
 
35
__CHEETAH_versionTuple__ = (2, 0, 1, 'final', 0)
 
36
__CHEETAH_genTime__ = 1246631133.195147
 
37
__CHEETAH_genTimestamp__ = 'Fri Jul  3 16:25:33 2009'
34
38
__CHEETAH_src__ = 'prewikka/templates/HTMLDocument.tmpl'
35
 
__CHEETAH_srcLastModified__ = 'Tue May  5 16:55:59 2009'
36
 
__CHEETAH_docstring__ = 'Autogenerated by Cheetah: The Python-Powered Template Engine'
 
39
__CHEETAH_srcLastModified__ = 'Fri Jul  3 16:20:36 2009'
 
40
__CHEETAH_docstring__ = 'Autogenerated by CHEETAH: The Python-Powered Template Engine'
37
41
 
38
42
if __CHEETAH_versionTuple__ < RequiredCheetahVersionTuple:
39
43
    raise AssertionError(
52
56
 
53
57
    def __init__(self, *args, **KWs):
54
58
 
55
 
        super(HTMLDocument, self).__init__(*args, **KWs)
 
59
        Template.__init__(self, *args, **KWs)
56
60
        if not self._CHEETAH__instanceInitialized:
57
61
            cheetahKWArgs = {}
58
62
            allowedKWs = 'searchList namespaces filter filtersLib errorCatcher'.split()
65
69
 
66
70
 
67
71
 
68
 
        ## CHEETAH: generated from #def head_extra_content at line 17, col 3.
 
72
        ## CHEETAH: generated from #def head_extra_content at line 17, col 17.
69
73
        trans = KWS.get("trans")
70
74
        if (not trans and not self._CHEETAH__isBuffering and not callable(self.transaction)):
71
75
            trans = self.transaction # is None unless self.awake() was called
105
109
        ########################################
106
110
        ## START - generated method body
107
111
        
108
 
        write(u'''<!DOCTYPE html PUBLIC \'-//W3C//DTD XHTML 1.0 Transitional//EN\' \'http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd\'>
 
112
        write('''<!DOCTYPE html PUBLIC \'-//W3C//DTD XHTML 1.0 Transitional//EN\' \'http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd\'>
109
113
 
110
114
<html xmlns="http://www.w3.org/1999/xhtml">
111
 
\t<head>
112
 
\t\t<title>''')
113
 
        _v = VFFSL(SL,"document.title",True) # u'$document.title' on line 5, col 10
114
 
        if _v is not None: write(_filter(_v, rawExpr=u'$document.title')) # from line 5, col 10.
115
 
        write(u'''</title>
116
 
\t\t<meta http-equiv="Content-Type" content="text/html; charset=UTF-8" />
117
 
\t\t<link rel="Shortcut Icon" href="prewikka/images/favicon.ico"/>
 
115
        <head>
 
116
                <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>
 
120
                <meta http-equiv="Content-Type" content="text/html; charset=UTF-8" />
 
121
                <link rel="Shortcut Icon" href="prewikka/images/favicon.ico"/>
118
122
 
119
123
''')
120
 
        for css_file in VFFSL(SL,"document.css_files",True): # generated from line 9, col 3
121
 
            write(u'''\t\t\t<link rel="stylesheet" href="''')
122
 
            _v = VFFSL(SL,"css_file",True) # u'$css_file' on line 10, col 33
123
 
            if _v is not None: write(_filter(_v, rawExpr=u'$css_file')) # from line 10, col 33.
124
 
            write(u'''" type="text/css"/>
125
 
''')
126
 
        write(u'''
127
 
''')
128
 
        for js_file in VFFSL(SL,"document.js_files",True): # generated from line 13, col 3
129
 
            write(u'''\t\t\t<script src="''')
130
 
            _v = VFFSL(SL,"js_file",True) # u'$js_file' on line 14, col 17
131
 
            if _v is not None: write(_filter(_v, rawExpr=u'$js_file')) # from line 14, col 17.
132
 
            write(u'''" type="text/javascript"></script>
133
 
''')
134
 
        write(u'''
135
 
\t\t''')
136
 
        _v = VFFSL(SL,"head_extra_content",True) # u'$head_extra_content' on line 19, col 3
137
 
        if _v is not None: write(_filter(_v, rawExpr=u'$head_extra_content')) # from line 19, col 3.
138
 
        write(u'''
139
 
\t</head>
140
 
\t''')
141
 
        _v = VFFSL(SL,"body",True) # u'$body' on line 21, col 2
142
 
        if _v is not None: write(_filter(_v, rawExpr=u'$body')) # from line 21, col 2.
143
 
        write(u'''
 
124
        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"/>
 
129
''')
 
130
        write('''
 
131
''')
 
132
        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>
 
137
''')
 
138
        write('''
 
139
                ''')
 
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('''
 
143
        </head>
 
144
        ''')
 
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('''
144
148
</html>
145
149
''')
146
150