blob: 7ab073c8c4b08125affbbb534d087e48821f978b (
plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
|
import os
from Component import CPage
from Component.notify import NotifyComponent
from ZPTKit import ZPTComponent
class SitePage(CPage):
components = [
ZPTComponent([os.path.join(os.path.dirname(__file__),
'templates')]),
NotifyComponent()]
def title(self):
return self.options.get('title', CPage.title(self))
def awake(self, trans):
CPage.awake(self, trans)
self.baseURL = self.request().environ()['$app_name.base_url']
self.baseStaticURL = self.baseURL + '/static'
self.setup()
def setup(self):
pass
def sleep(self, trans):
self.teardown()
CPage.sleep(self, trans)
def teardown(self):
pass
def writeHTML(self):
self.writeTemplate()
|