~ubuntu-branches/ubuntu/intrepid/prewikka/intrepid

« back to all changes in this revision

Viewing changes to prewikka/templates/About.py

  • Committer: Bazaar Package Importer
  • Author(s): Pierre Chifflier
  • Date: 2007-04-11 14:41:09 UTC
  • Revision ID: james.westby@ubuntu.com-20070411144109-2hh7zx3amwd27b4l
Tags: upstream-0.9.10
ImportĀ upstreamĀ versionĀ 0.9.10

Show diffs side-by-side

added added

removed removed

Lines of Context:
 
1
#!/usr/bin/env python
 
2
 
 
3
 
 
4
 
 
5
 
 
6
##################################################
 
7
## DEPENDENCIES
 
8
import sys
 
9
import os
 
10
import os.path
 
11
from os.path import getmtime, exists
 
12
import time
 
13
import types
 
14
import __builtin__
 
15
from Cheetah.Version import MinCompatibleVersion as RequiredCheetahVersion
 
16
from Cheetah.Version import MinCompatibleVersionTuple as RequiredCheetahVersionTuple
 
17
from Cheetah.Template import Template
 
18
from Cheetah.DummyTransaction import DummyTransaction
 
19
from Cheetah.NameMapper import NotFound, valueForName, valueFromSearchList, valueFromFrameOrSearchList
 
20
from Cheetah.CacheRegion import CacheRegion
 
21
import Cheetah.Filters as Filters
 
22
import Cheetah.ErrorCatchers as ErrorCatchers
 
23
from prewikka.templates.ClassicLayout import ClassicLayout
 
24
from prewikka import siteconfig
 
25
 
 
26
##################################################
 
27
## MODULE CONSTANTS
 
28
try:
 
29
    True, False
 
30
except NameError:
 
31
    True, False = (1==1), (1==0)
 
32
VFFSL=valueFromFrameOrSearchList
 
33
VFSL=valueFromSearchList
 
34
VFN=valueForName
 
35
currentTime=time.time
 
36
__CHEETAH_version__ = '2.0rc7'
 
37
__CHEETAH_versionTuple__ = (2, 0, 0, 'candidate', 7)
 
38
__CHEETAH_genTime__ = 1175011472.6540599
 
39
__CHEETAH_genTimestamp__ = 'Tue Mar 27 18:04:32 2007'
 
40
__CHEETAH_src__ = 'prewikka/templates/About.tmpl'
 
41
__CHEETAH_srcLastModified__ = 'Tue Mar 27 18:04:23 2007'
 
42
__CHEETAH_docstring__ = 'Autogenerated by CHEETAH: The Python-Powered Template Engine'
 
43
 
 
44
if __CHEETAH_versionTuple__ < RequiredCheetahVersionTuple:
 
45
    raise AssertionError(
 
46
      'This template was compiled with Cheetah version'
 
47
      ' %s. Templates compiled before version %s must be recompiled.'%(
 
48
         __CHEETAH_version__, RequiredCheetahVersion))
 
49
 
 
50
##################################################
 
51
## CLASSES
 
52
 
 
53
class About(ClassicLayout):
 
54
 
 
55
    ##################################################
 
56
    ## CHEETAH GENERATED METHODS
 
57
 
 
58
 
 
59
    def __init__(self, *args, **KWs):
 
60
 
 
61
        ClassicLayout.__init__(self, *args, **KWs)
 
62
        if not self._CHEETAH__instanceInitialized:
 
63
            cheetahKWArgs = {}
 
64
            allowedKWs = 'searchList namespaces filter filtersLib errorCatcher'.split()
 
65
            for k,v in KWs.items():
 
66
                if k in allowedKWs: cheetahKWArgs[k] = v
 
67
            self._initCheetahInstance(**cheetahKWArgs)
 
68
        
 
69
 
 
70
    def main_content(self, **KWS):
 
71
 
 
72
 
 
73
 
 
74
        ## CHEETAH: generated from #block main_content at line 4, col 1.
 
75
        trans = KWS.get("trans")
 
76
        if (not trans and not self._CHEETAH__isBuffering and not callable(self.transaction)):
 
77
            trans = self.transaction # is None unless self.awake() was called
 
78
        if not trans:
 
79
            trans = DummyTransaction()
 
80
            _dummyTrans = True
 
81
        else: _dummyTrans = False
 
82
        write = trans.response().write
 
83
        SL = self._CHEETAH__searchList
 
84
        _filter = self._CHEETAH__currentFilter
 
85
        
 
86
        ########################################
 
87
        ## START - generated method body
 
88
        
 
89
        _orig_filter_29945640 = _filter
 
90
        filterName = 'CleanOutput'
 
91
        if self._CHEETAH__filters.has_key("CleanOutput"):
 
92
            _filter = self._CHEETAH__currentFilter = self._CHEETAH__filters[filterName]
 
93
        else:
 
94
            _filter = self._CHEETAH__currentFilter = \
 
95
                        self._CHEETAH__filters[filterName] = getattr(self._CHEETAH__filtersLib, filterName)(self).filter
 
96
        write('''
 
97
<div id="about" style="border: 0px solid red;"> 
 
98
 
 
99
<div style="vertical-align: top; padding-right: 40px;">
 
100
 
 
101
<h2 style="font-weight: bold; color: #4D535C;">Prewikka ''')
 
102
        _v = VFFSL(SL,"siteconfig.version",True) # '$siteconfig.version' on line 11, col 57
 
103
        if _v is not None: write(_filter(_v, rawExpr='$siteconfig.version')) # from line 11, col 57.
 
104
        write('''</h2>
 
105
 
 
106
<br />
 
107
 
 
108
<p style="font-size: 11px; font-weight: bold; font-style: italic; color: #4D535C;">
 
109
 <a href="http://www.prelude-ids.com">PreludeIDS Technologies</a> ''')
 
110
        if False:
 
111
            _("provides support to Large Accounts, Major Companies and Government Agencies around the world, to improve and strengthen the security of their systems and networks.")
 
112
        _v = VFFSL(SL,"_",False)("provides support to Large Accounts, Major Companies and Government Agencies around the world, to improve and strengthen the security of their systems and networks.") # '$_("provides support to Large Accounts, Major Companies and Government Agencies around the world, to improve and strengthen the security of their systems and networks.")' on line 16, col 67
 
113
        if _v is not None: write(_filter(_v, rawExpr='$_("provides support to Large Accounts, Major Companies and Government Agencies around the world, to improve and strengthen the security of their systems and networks.")')) # from line 16, col 67.
 
114
        write('''
 
115
</p>
 
116
 
 
117
</div>
 
118
 
 
119
<br/>
 
120
 
 
121
<img style="margin-left: 10px; margin-top: -10px; padding: 0; float: right;" src="prewikka/images/prelude-logo.gif" alt="Prelude-IDS logo" />
 
122
 
 
123
<div style="display: block; vertical-align: middle;">
 
124
 
 
125
<br/>
 
126
 
 
127
<ul><li style="color: #6f9662; font-weight: bold;">Customizing Prelude
 
128
  <p>
 
129
  ''')
 
130
        if False:
 
131
            _("In keeping with the Open Source spirit, we encourage you to participate in the development of your application. You can order customized versions of Prelude to suit your needs: adapting, adding on functionality etc. Because they are carried out by PreludeIDS engineers, you know that any modifications made to the system will be integrated optimally and guaranteed by our technical support department. Additionally, the company can extend Prelude to handle yet unsupported sensors (including proprietary), ruleset extension to handle new devices and porting of Prelude to unsupported operating systems.")
 
132
        _v = VFFSL(SL,"_",False)("In keeping with the Open Source spirit, we encourage you to participate in the development of your application. You can order customized versions of Prelude to suit your needs: adapting, adding on functionality etc. Because they are carried out by PreludeIDS engineers, you know that any modifications made to the system will be integrated optimally and guaranteed by our technical support department. Additionally, the company can extend Prelude to handle yet unsupported sensors (including proprietary), ruleset extension to handle new devices and porting of Prelude to unsupported operating systems.") # '$_("In keeping with the Open Source spirit, we encourage you to participate in the development of your application. You can order customized versions of Prelude to suit your needs: adapting, adding on functionality etc. Because they are carried out by PreludeIDS engineers, you know that any modifications made to the system will be integrated optimally and guaranteed by our technical support department. Additionally, the company can extend Prelude to handle yet unsupported sensors (including proprietary), ruleset extension to handle new devices and porting of Prelude to unsupported operating systems.")' on line 31, col 3
 
133
        if _v is not None: write(_filter(_v, rawExpr='$_("In keeping with the Open Source spirit, we encourage you to participate in the development of your application. You can order customized versions of Prelude to suit your needs: adapting, adding on functionality etc. Because they are carried out by PreludeIDS engineers, you know that any modifications made to the system will be integrated optimally and guaranteed by our technical support department. Additionally, the company can extend Prelude to handle yet unsupported sensors (including proprietary), ruleset extension to handle new devices and porting of Prelude to unsupported operating systems.")')) # from line 31, col 3.
 
134
        write('''
 
135
  </p>
 
136
</li>
 
137
 
 
138
<li style="color: #6f9662; font-weight: bold;">Software Maintenance and Technical Support
 
139
  <p>
 
140
   ''')
 
141
        if False:
 
142
            _("PreludeIDS maintenance and support services guarantee optimal operation of the Prelude platform on your infrastructure. With our support services, you benefit from priority assistance and the expertise of our engineers, while the maintenance service we offer maintains and updates your software.")
 
143
        _v = VFFSL(SL,"_",False)("PreludeIDS maintenance and support services guarantee optimal operation of the Prelude platform on your infrastructure. With our support services, you benefit from priority assistance and the expertise of our engineers, while the maintenance service we offer maintains and updates your software.") # '$_("PreludeIDS maintenance and support services guarantee optimal operation of the Prelude platform on your infrastructure. With our support services, you benefit from priority assistance and the expertise of our engineers, while the maintenance service we offer maintains and updates your software.")' on line 37, col 4
 
144
        if _v is not None: write(_filter(_v, rawExpr='$_("PreludeIDS maintenance and support services guarantee optimal operation of the Prelude platform on your infrastructure. With our support services, you benefit from priority assistance and the expertise of our engineers, while the maintenance service we offer maintains and updates your software.")')) # from line 37, col 4.
 
145
        write('''
 
146
  </p>
 
147
</li>
 
148
 
 
149
<li style="color: #6f9662; font-weight: bold;">Commercial licenses
 
150
  <p>
 
151
  ''')
 
152
        if False:
 
153
            _("The Prelude framework is licensed under the")
 
154
        _v = VFFSL(SL,"_",False)("The Prelude framework is licensed under the") # '$_("The Prelude framework is licensed under the")' on line 43, col 3
 
155
        if _v is not None: write(_filter(_v, rawExpr='$_("The Prelude framework is licensed under the")')) # from line 43, col 3.
 
156
        write(' <a href="http://www.gnu.org/licenses/gpl.txt">General Public License</a>.\n  ')
 
157
        if False:
 
158
            _("PreludeIDS provides specific commercial licenses to allow proprietary systems based on Prelude to be developed and to interoperate.")
 
159
        _v = VFFSL(SL,"_",False)("PreludeIDS provides specific commercial licenses to allow proprietary systems based on Prelude to be developed and to interoperate.") # '$_("PreludeIDS provides specific commercial licenses to allow proprietary systems based on Prelude to be developed and to interoperate.")' on line 44, col 3
 
160
        if _v is not None: write(_filter(_v, rawExpr='$_("PreludeIDS provides specific commercial licenses to allow proprietary systems based on Prelude to be developed and to interoperate.")')) # from line 44, col 3.
 
161
        write('''
 
162
   </p>
 
163
</li>
 
164
 
 
165
<li style="color: #6f9662; font-weight: bold;">Advice, Deployment and Training
 
166
  <p>
 
167
  ''')
 
168
        if False:
 
169
            _("Through our partners, you have access to an array of top-of-the-line security services. By advising you on how to secure your infrastructure, deploying Prelude and training your users, we provide a turnkey solution to secure your infrastructure, delivered by specialists.")
 
170
        _v = VFFSL(SL,"_",False)("Through our partners, you have access to an array of top-of-the-line security services. By advising you on how to secure your infrastructure, deploying Prelude and training your users, we provide a turnkey solution to secure your infrastructure, delivered by specialists.") # '$_("Through our partners, you have access to an array of top-of-the-line security services. By advising you on how to secure your infrastructure, deploying Prelude and training your users, we provide a turnkey solution to secure your infrastructure, delivered by specialists.")' on line 50, col 3
 
171
        if _v is not None: write(_filter(_v, rawExpr='$_("Through our partners, you have access to an array of top-of-the-line security services. By advising you on how to secure your infrastructure, deploying Prelude and training your users, we provide a turnkey solution to secure your infrastructure, delivered by specialists.")')) # from line 50, col 3.
 
172
        write('''
 
173
  </p>
 
174
</li>
 
175
 
 
176
</ul>
 
177
 
 
178
</div>
 
179
 
 
180
<br/>
 
181
 
 
182
<div style="display: table-row; vertical-align: bottom;width: 100%;"> 
 
183
 
 
184
<table align="center" id="about_contact">
 
185
 <tr style="text-align: center;">
 
186
  <td><b>Contact</b></td>
 
187
  <td><b>Headquarter</b></td>
 
188
  <td><b>Website</b></td>
 
189
 </tr>
 
190
 <tr>
 
191
  <td><a href="mailto:info@prelude-ids.com">info@prelude-ids.com</a></td>
 
192
  <td>2, rue David Girin</td>
 
193
  <td><a href="http://www.prelude-ids.com">http://www.prelude-ids.com</a></td>
 
194
 </tr>
 
195
 <tr>
 
196
  <td><b>Phone:</b> +33 8 70 70 21 58</td>
 
197
  <td>69002 Lyon</td>
 
198
  <td>&nbsp;</td>
 
199
 </tr>
 
200
 <tr>
 
201
  <td>&nbsp;&nbsp;&nbsp;<b>Fax:</b> +33 4 78 42 21 58</td>
 
202
  <td>France</td>
 
203
  <td>&nbsp;</td>
 
204
 </tr>
 
205
</table>
 
206
 
 
207
</div>
 
208
<center style="vertical-align: bottom;" >Copyright &copy; 2004 - 2007 PreludeIDS Technologies. All right reserved.</center>
 
209
 
 
210
</div>
 
211
 
 
212
''')
 
213
        _filter = _orig_filter_29945640
 
214
        
 
215
        ########################################
 
216
        ## END - generated method body
 
217
        
 
218
        return _dummyTrans and trans.response().getvalue() or ""
 
219
        
 
220
 
 
221
    def writeBody(self, **KWS):
 
222
 
 
223
 
 
224
 
 
225
        ## CHEETAH: main method generated for this template
 
226
        trans = KWS.get("trans")
 
227
        if (not trans and not self._CHEETAH__isBuffering and not callable(self.transaction)):
 
228
            trans = self.transaction # is None unless self.awake() was called
 
229
        if not trans:
 
230
            trans = DummyTransaction()
 
231
            _dummyTrans = True
 
232
        else: _dummyTrans = False
 
233
        write = trans.response().write
 
234
        SL = self._CHEETAH__searchList
 
235
        _filter = self._CHEETAH__currentFilter
 
236
        
 
237
        ########################################
 
238
        ## START - generated method body
 
239
        
 
240
        write('\n')
 
241
        self.main_content(trans=trans)
 
242
        
 
243
        ########################################
 
244
        ## END - generated method body
 
245
        
 
246
        return _dummyTrans and trans.response().getvalue() or ""
 
247
        
 
248
    ##################################################
 
249
    ## CHEETAH GENERATED ATTRIBUTES
 
250
 
 
251
 
 
252
    _CHEETAH__instanceInitialized = False
 
253
 
 
254
    _CHEETAH_version = __CHEETAH_version__
 
255
 
 
256
    _CHEETAH_versionTuple = __CHEETAH_versionTuple__
 
257
 
 
258
    _CHEETAH_genTime = __CHEETAH_genTime__
 
259
 
 
260
    _CHEETAH_genTimestamp = __CHEETAH_genTimestamp__
 
261
 
 
262
    _CHEETAH_src = __CHEETAH_src__
 
263
 
 
264
    _CHEETAH_srcLastModified = __CHEETAH_srcLastModified__
 
265
 
 
266
    _mainCheetahMethod_for_About= 'writeBody'
 
267
 
 
268
## END CLASS DEFINITION
 
269
 
 
270
if not hasattr(About, '_initCheetahAttributes'):
 
271
    templateAPIClass = getattr(About, '_CHEETAH_templateClass', Template)
 
272
    templateAPIClass._addCheetahPlumbingCodeToClass(About)
 
273
 
 
274
 
 
275
# CHEETAH was developed by Tavis Rudd and Mike Orr
 
276
# with code, advice and input from many other volunteers.
 
277
# For more information visit http://www.CheetahTemplate.org/
 
278
 
 
279
##################################################
 
280
## if run from command line:
 
281
if __name__ == '__main__':
 
282
    from Cheetah.TemplateCmdLineIface import CmdLineIface
 
283
    CmdLineIface(templateObj=About()).run()
 
284
 
 
285