/[glsr]/trunk/htdocs/index.py
Gentoo

Contents of /trunk/htdocs/index.py

Parent Directory Parent Directory | Revision Log Revision Log


Revision 37 - (show annotations) (download) (as text)
Thu Jun 30 21:48:34 2005 UTC (9 years, 3 months ago) by port001
File MIME type: text/x-python
File size: 825 byte(s)
Basic index domain module
1
2 import os
3
4 from harmonious import harm
5 from harmonious.lib.template import Template
6
7 from glsr.setup import config
8
9 class Index:
10
11 def __init__(self):
12
13 self.__template = Template()
14
15 @harm.default
16 @harm.exposed
17 def main(self):
18
19 self.news()
20
21 @harm.exposed
22 def news(self):
23
24 self.__do_header()
25
26 harm.response.append_body("Hello from the news page!")
27
28 self.__do_footer()
29
30 def __do_header(self):
31
32 self.__template.compile(os.path.join(config.template_loc, 'header.tpl'))
33 self.__template.param('GLSR_URL', config.url)
34 harm.response.append_body(self.__template.output())
35
36 def __do_footer(self):
37
38 self.__template.compile(os.path.join(config.template_loc, 'footer.tpl'))
39 harm.response.append_body(self.__template.output())

  ViewVC Help
Powered by ViewVC 1.1.20