[albatross-users] how to play with the samples ?

Matt Goodall matt at pollenation.net
Mon Aug 4 07:25:59 EST 2003


On Sun, 2003-07-27 at 21:40, vincent delft wrote:
> I've downloaded the tar file.
> But before install it I would like to test it. Thus
> I've added Albatross-1.10 to my python path.
> If I go to sample/extension, I can run cal.py and get
> an html file with calandar (it's correct).
> 
> BUT
> 
> How to test it with al-hhtpd ?

Sorry for the slow response, I've been on holiday for the last week :).

There was a brief comment about how useful it might be if the samples
ran under al-httpd some time ago. However, as Andrew mentioned, al-httpd
(and the albatross.httpdapp module) are fairly new and the samples have
not been changed, nor has there been any proper discussion about whether
they should be changed.

However, it's not hard to do it yourself. If you edit cal.py and change:

  if __name__ == '__main__':
      app = SimpleApp('cal.py', '.', 'start', '-=-secret-=-')
      app.register_tagclasses(Calendar)
      app.register_page('start', CalendarPage())
      app.run(Request())

to:

  app = SimpleApp('/', '.', 'start', '-=-secret-=-')
  app.register_tagclasses(Calendar)
  app.register_page('start', CalendarPage())

then it runs under al-httpd, using something like "al-httpd cal.app
8000".

It should be easy enough to change the other sample applications in a
similar way.

Hope this helps.

Cheers, Matt

-- 
Matt Goodall, Pollenation Internet Ltd
w: http://www.pollenation.net
e: matt at pollenation.net



More information about the Albatross-users mailing list