Hello World

__revision__ = “$Id: slash.py 975 2008-03-19 10:44:16Z mario $”

from gz.fill.directory import Directory
from gz.fill.exportable import X
from gz.pub.publisher import Publisher
from gz.pub.common import page

class SitePublisher(Publisher):

configuration = dict(
http_address=(”, 8016),
)

class SiteDirectory(Directory):

exportables = [
X(”, ‘index’, ‘Hello’, ‘Hello World’),
]

def index(self):
return page(self.get_x().title, ‘Hello World!’)
Running the site
To launch the site, we use the qp management script that will look through its sites search path for the helloworld python package:

qp helloworld start
Note that this expects a helloworld/var subdirectory, where to write log and pid files.

To view, we load the URL:

http://localhost:8016/