From matt at pollenation.net Mon Aug 4 07:25:59 2003 From: matt at pollenation.net (Matt Goodall) Date: 03 Aug 2003 22:25:59 +0100 Subject: [albatross-users] how to play with the samples ? In-Reply-To: <20030727204021.22065.qmail@web11503.mail.yahoo.com> References: <20030727204021.22065.qmail@web11503.mail.yahoo.com> Message-ID: <1059945958.17185.21.camel@localhost> 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 From matt at pollenation.net Mon Aug 4 08:41:36 2003 From: matt at pollenation.net (Matt Goodall) Date: 03 Aug 2003 23:41:36 +0100 Subject: [albatross-users] Form validation Message-ID: <1059950496.14230.16.camel@localhost> Can anyone recommend a package to assist with server-side form validation, preferably one that works nicely with Albatross? Thanks, Matt -- Matt Goodall, Pollenation Internet Ltd w: http://www.pollenation.net e: matt at pollenation.net From matt at pollenation.net Tue Aug 5 02:16:00 2003 From: matt at pollenation.net (Matt Goodall) Date: Mon, 04 Aug 2003 17:16:00 +0100 Subject: [albatross-users] [bug] cookie path is never set Message-ID: <3F2E86C0.6000401@pollenation.net> I think I just came across a small bug in the cookie handling caused because session.py never sets a path for the cookie so the browser assumes the cookie is bound to the current URL's path. In a random mode app the page name can include paths (they map to Python packages) and as you wander around the application's pages Albatross is setting multiple cookies. Below are some examples of what the (implicit) cookie path is for some made up URLs: /home, cookie path = / /help, cookie path = / /nested/something, cookie path=/nested /nested/another, cookie path=/nested So now we've got two cookies set with different paths (/ and /nested) and they may not have the same session id. If the / cookie is set first then the browser will send that cookie back to the server when one of the /nested/ pages is visited, Albatross will retrieve the session id and then set another cookie with a path of /nested. In this case there are multiple cookies but each one has the same session id - a bit messy but not a great problem. However, if the /nested cookie is set first then it will not be sent back to the server for the /home and /help URLs. That causes Albatross to create a new session and set a cookie for it with a path of /. After that, depending on where you are in the app, you will be using one of two cookies and hence one of two sessions. I'm pretty sure the fix is just to explicitly set a cookie path. It should be possible to use the base_uri to work out a path to use. I'll see what I can come up with if noone else gets there first. Note that this bug is unlikely to affect non-random apps since they don't use page paths. However, I have definitely seen a case where I had two cookies set for a non-random application which caused all sorts of fun with session management. I didn't know why it was happening at the time and couldn't pin it down. I still have no idea how I managed to get the cookies in that state but now I know what caused it ;-). Cheers, Matt -- Matt Goodall, Pollenation Internet Ltd w: http://www.pollenationinternet.com e: matt at pollenation.net t: +44 (0)113 2252500 From matt at pollenation.net Tue Aug 5 02:56:32 2003 From: matt at pollenation.net (Matt Goodall) Date: Mon, 04 Aug 2003 17:56:32 +0100 Subject: [patch] explicitly set cookie path (was Re: [albatross-users] [bug] cookie path is never set) In-Reply-To: <3F2E86C0.6000401@pollenation.net> References: <3F2E86C0.6000401@pollenation.net> Message-ID: <3F2E9040.8040709@pollenation.net> Matt Goodall wrote: > I'm pretty sure the fix is just to explicitly set a cookie path. It > should be possible to use the base_uri to work out a path to use. I'll > see what I can come up with if noone else gets there first. Patch attached, seems to work ok for both session file and session server but please review the change. There's a bit of repetition in session.py and sessionfile.py but I'll let someone else take the blame for any refactoring that breaks everything ;-). Cheers, Matt -- Matt Goodall, Pollenation Internet Ltd w: http://www.pollenationinternet.com e: matt at pollenation.net t: +44 (0)113 2252500 -------------- next part -------------- An embedded and charset-unspecified text was scrubbed... Name: cookie-path.patch URL: From matt at pollenation.net Wed Aug 6 00:22:56 2003 From: matt at pollenation.net (Matt Goodall) Date: Tue, 05 Aug 2003 15:22:56 +0100 Subject: [albatross-users] [patch] HTTPServer static resources In-Reply-To: <3F1BFCCA.5040200@pollenation.net> References: <3F1BFCCA.5040200@pollenation.net> Message-ID: <3F2FBDC0.8050404@pollenation.net> Attached is another patch against 1.10 for the same purpose as described below. This version works on MS Windows (I was opening the file in text mode before!), sends the 'Content-Length' header for the file and is also a bit neater. Cheers, Matt Matt Goodall wrote: > Hi, > > Attached is a patch against 1.10 that allows HTTPServer to serve > static resources (images, stylesheets etc) directly from the > filesystem with no help from the Albatross application. An example of > its use is: > > from albatross import httpdapp > > app = new MyAlbatrossApp() > static_resources = { > '/images': './images', > '/styles': 'somewhere/styles' > } > httpd = httpdapp.HTTPServer(app, 8000, static_resources) > httpd.serve_forever() > > static_resources is an _optional_ dictionary, mapping uri to > filesystem paths. Note that this change is not yet reflected in the > al-httpd script but the script still works in the same way as before. > > Hope this is useful. > > Cheers, Matt > >------------------------------------------------------------------------ > >diff -ru ./albatross/httpdapp.py ../albatross-1.10-matt/albatross/httpdapp.py >--- ./albatross/httpdapp.py 2003-07-12 05:42:51.000000000 +0100 >+++ ../albatross-1.10-matt/albatross/httpdapp.py 2003-07-21 15:27:07.000000000 +0100 >@@ -8,6 +8,7 @@ > > import BaseHTTPServer > import cgi >+import mimetypes > from cStringIO import StringIO > from urlparse import urlsplit > >@@ -116,12 +117,19 @@ > """ > > def do_GET(self): >+ # Try the static resources first >+ for uri_path, fs_path in self.server.static_resources.items(): >+ if self.path.startswith(uri_path): >+ path = self.path.split(uri_path)[1] >+ self.send_file('%s%s' % (fs_path, path)) >+ return > self.process_request() > > def do_POST(self): > self.process_request() > > def process_request(self): >+ '''Process a request to the Albatross app''' > self.log_request() > req = Request(self) > self.server.app.run(req) >@@ -132,11 +140,54 @@ > if req.status() == 200: > self.wfile.write(req.data.getvalue()) > >+ def send_file(self, path): >+ '''Send a file directly from the filesystem''' >+ >+ self.log_request() >+ >+ f = None >+ data = None >+ mime_type = None >+ >+ try: >+ try: >+ f = file(path) >+ data = f.read() >+ except IOError, e: >+ print e >+ finally: >+ if f: >+ f.close() >+ >+ if not data: >+ self.send_response(404) >+ self.end_headers() >+ else: >+ self.send_response(200) >+ self.send_header('Content-Type', mimetypes.guess_type(path)[0]) >+ self.end_headers() >+ self.wfile.write(data) >+ > > class HTTPServer(BaseHTTPServer.HTTPServer): > >- """Simple, standalone HTTP server for Albatross applications.""" >+ """ >+ Simple, standalone HTTP server for Albatross applications. >+ >+ HTTPServer is a simple web server dedicated to processing requests and >+ mapping that request through to Albatross. It can also serve static >+ resources such as images, stylesheets etc directly from the filesystem. >+ """ > >- def __init__(self, app, port): >- BaseHTTPServer.HTTPServer.__init__(self, ('', port), RequestHandler) >+ def __init__(self, app, port, static_resources={}): >+ ''' >+ Create an HTTP server for the Albatross application, app, >+ and listen for requests on the specified port. >+ >+ static_resources is an optional dictionary that maps uri paths to >+ a corresponding filesystem path. Static resources are served directly >+ from the filesystem without involving the Albatross application. >+ ''' >+ BaseHTTPServer.HTTPServer.__init__( self, ('', port), RequestHandler) > self.app = app >+ self.static_resources = static_resources > > -- Matt Goodall, Pollenation Internet Ltd w: http://www.pollenationinternet.com e: matt at pollenation.net t: +44 (0)113 2252500 -------------- next part -------------- An embedded and charset-unspecified text was scrubbed... Name: httpdapp-static-resources.patch URL: From max at provico.fi Thu Aug 7 16:54:59 2003 From: max at provico.fi (Max Romantschuk) Date: Thu, 7 Aug 2003 09:54:59 +0300 Subject: [albatross-users] Request for pre-specification enlightenment Message-ID: <1060239299.3f31f7c3b4cb7@webmail.provico.fi> Hello boys and girls, I'm new to the list, after having been convinced to bring my wraith upon you all by Fabian Fagerholm (You're welcome, Fabian). We've decided to attempt building a simple content management system to meet the needs of both our homepages. I am aware of the fact that there are several out there already, but I'm doing this for the fun of it. I'm hoping the members of the list can help set me and Fabian on the right track. Fabian has infinitely more experience with Albatross than I (as I have none), but I have several years worth of experiece with building web applications with Perl, PHP, ColdFusion, Zope and whatnot... We're hoping that our combined forces will serve as a nicely contradicting bowl of ideas and venomous snakes. This energy should eventually be channeled into some badass code. Before I tell you about the requirements I'd like to point out that we wish to build this system pretty much from scratch, using only the most generic of pre-made building blocks. This may seem like a waste of time, but there's nothing like really building a system from start to finish, in terms of learning. Now, here's what we wish to do: A simple content management system, consisting of two main parts. The site-view, which is what all the nice users will see, and the admin-view, which we will see. These two views need to show the same data, but in different perspective (presentation versus content-creation). The system should meet the following requirements: There must be a simple but extendable authentication framework. I'd like to start of with a simple authenticated/not model and work towards a Zope-style monster model (see here: http://zope.org/Documentation/Books/ZopeBook/current/Security.stx It's a good read). I don't wish to get there anytime soon. The system will use a simple tree-based approach to organize content. The tree determines the navigation at the same time. The tree approach enables some neat tricks to be done with relative ease. A document can serve as a parent for images shown in the document. An image gallery can serve as a parent for images shown in the gallery, etc. There should also be a master-template showing the navigation and other global stuff. An area of the master template is reserved for the actual content to be displayed. The master teplate should therefore be able to switch the view in the content area based upon context. The following features are planned: Documents, consisting of XHTML-data Files and Images Weblog Image gallery My current homepage is at http://max.nma.fi/ Feel free to take a look at what I'm trying to replace. I realize this description is vague, and that the approach I've envisioned may not suit the Albatross environment. I therefore hope that the members of the list can help us in finding a sensible approach, while still maintaining our goals. Now then... bring on the hailstorm of bashing please. .: Max Romantschuk .: http://max.nma.fi/ .: http://www.mp3.com/romax/ From fabbe at paniq.net Thu Aug 7 18:01:01 2003 From: fabbe at paniq.net (Fabian Fagerholm) Date: 07 Aug 2003 11:01:01 +0300 Subject: [albatross-users] Update: Debian package of Albatross 1.10 Message-ID: <1060243261.741.26.camel@kernel> Greetings, Having returned from what could be defined as vacation, I have updated the Albatross Debian packages to version 1.10. You can find the packages at http://people.paniq.net/~fabbe/debian/albatross/ Any and all feedback is welcome, and patches are even more welcome, especially ones that fix the remaining issues with documentation generation (although you may want to direct your efforts towards fixing dia first, right Dave? :). Cheers, -- Fabian Fagerholm -------------- next part -------------- A non-text attachment was scrubbed... Name: signature.asc Type: application/pgp-signature Size: 189 bytes Desc: This is a digitally signed message part URL: From tchur at optushome.com.au Thu Aug 7 18:03:16 2003 From: tchur at optushome.com.au (Tim Churches) Date: Thu, 07 Aug 2003 18:03:16 +1000 Subject: [albatross-users] Request for pre-specification enlightenment Message-ID: <200308070803.h7783G132151@mail014.syd.optusnet.com.au> An embedded and charset-unspecified text was scrubbed... Name: not available URL: -------------- next part -------------- A non-text attachment was scrubbed... Name: icdtree1.gif Type: image/gif Size: 43259 bytes Desc: not available URL: -------------- next part -------------- A non-text attachment was scrubbed... Name: icdtree2.gif Type: image/gif Size: 24553 bytes Desc: not available URL: From matt at pollenation.net Thu Aug 7 20:10:01 2003 From: matt at pollenation.net (Matt Goodall) Date: Thu, 07 Aug 2003 11:10:01 +0100 Subject: [albatross-users] [patch] latest httpdapp Message-ID: <3F322579.9040909@pollenation.net> Attached is my latest patch (diff to 1.10) to the httpdapp module. Changes to the 1.10 version are: * Support for serving static resources directly from the filesystem. * Cleaned up and simplified the request parsing to make use of cgiapp.RequestFields (at last!). * Supports file upload (looks ok after initial tests). I hope these patches are not getting too confusing, basically this one replaces the other httpdapp patches I have sent to the list. Dave/Andrew: I've got quite a few patches sitting in the list which I suspect have not been picked up yet. If it makes it easier I can send them directly to you when you have time to look at them ... just ask if that would help. Cheers, Matt -- Matt Goodall, Pollenation Internet Ltd w: http://www.pollenationinternet.com e: matt at pollenation.net t: +44 (0)113 2252500 -------------- next part -------------- An embedded and charset-unspecified text was scrubbed... Name: httpdapp.patch URL: From djc at object-craft.com.au Thu Aug 7 21:50:18 2003 From: djc at object-craft.com.au (Dave Cole) Date: 07 Aug 2003 21:50:18 +1000 Subject: [albatross-users] Update: Debian package of Albatross 1.10 In-Reply-To: <1060243261.741.26.camel@kernel> References: <1060243261.741.26.camel@kernel> Message-ID: >>>>> "Fabian" == Fabian Fagerholm writes: Fabian> Greetings, Having returned from what could be defined as Fabian> vacation, I have updated the Albatross Debian packages to Fabian> version 1.10. You can find the packages at Fabian> http://people.paniq.net/~fabbe/debian/albatross/ Fabian> Any and all feedback is welcome, and patches are even more Fabian> welcome, especially ones that fix the remaining issues with Fabian> documentation generation (although you may want to direct your Fabian> efforts towards fixing dia first, right Dave? :). You are right. I suppose I should send them a message telling them that I think they have made a very bad decision with their font handling for EPS generation. They have thrown all font hinting technology out of the window and claim the feature as a clever move :-). - Dave -- http://www.object-craft.com.au From djc at object-craft.com.au Thu Aug 7 21:55:41 2003 From: djc at object-craft.com.au (Dave Cole) Date: 07 Aug 2003 21:55:41 +1000 Subject: [albatross-users] Request for pre-specification enlightenment In-Reply-To: <200308070803.h7783G132151@mail014.syd.optusnet.com.au> References: <200308070803.h7783G132151@mail014.syd.optusnet.com.au> Message-ID: >>>>> "Tim" == Tim Churches writes: Tim> Max Romantschuk wrote: >> I'm hoping the members of the list can help set me and Fabian on >> the right track. Fabian has infinitely more experience with >> Albatross than I (as I have none), but I have several years worth >> of experiece with building web applications with Perl, PHP, >> ColdFusion, Zope and whatnot... Tim> Interested in any comparison of Albatross and ColdFusion. >> The system will use a simple tree-based approach to organize >> content. The tree determines the navigation at the same time. Tim> The Albatross lazy-loading ellipsis tree works very well, even Tim> with very large trees - see attached two partial screenshots of a Tim> tree containing over 10,000 nodes. Response is instantaneous, Tim> because only a small "window" on the tree is displayed at any Tim> time (clicking the ellipsis expands that section). Nice images Tim. I haven't seen that application for quite some time. It looks much less spartan than the last time I saw it. Now there are colours and everything. :-) - Dave -- http://www.object-craft.com.au From djc at object-craft.com.au Thu Aug 7 22:00:13 2003 From: djc at object-craft.com.au (Dave Cole) Date: 07 Aug 2003 22:00:13 +1000 Subject: [albatross-users] [bug] cookie path is never set In-Reply-To: <3F2E86C0.6000401@pollenation.net> References: <3F2E86C0.6000401@pollenation.net> Message-ID: > I think I just came across a small bug in the cookie handling caused > because session.py never sets a path for the cookie so the browser > assumes the cookie is bound to the current URL's path. > > In a random mode app the page name can include paths (they map to > Python packages) and as you wander around the application's pages > Albatross is setting multiple cookies. Below are some examples of > what the (implicit) cookie path is for some made up URLs: > > /home, cookie path = / > /help, cookie path = / > /nested/something, cookie path=/nested > /nested/another, cookie path=/nested > > So now we've got two cookies set with different paths (/ and > /nested) and they may not have the same session id. Ooops. > If the / cookie is set first then the browser will send that cookie > back to the server when one of the /nested/ pages is visited, > Albatross will retrieve the session id and then set another cookie > with a path of /nested. In this case there are multiple cookies but > each one has the same session id - a bit messy but not a great problem. Ooops. > However, if the /nested cookie is set first then it will not be sent > back to the server for the /home and /help URLs. That causes > Albatross to create a new session and set a cookie for it with a > path of /. After that, depending on where you are in the app, you > will be using one of two cookies and hence one of two sessions. Ooops. > I'm pretty sure the fix is just to explicitly set a cookie path. It > should be possible to use the base_uri to work out a path to > use. I'll see what I can come up with if noone else gets there > first. I think you are correct. I think you might beat everyone. > Note that this bug is unlikely to affect non-random apps since they > don't use page paths. However, I have definitely seen a case where I > had two cookies set for a non-random application which caused all > sorts of fun with session management. I didn't know why it was > happening at the time and couldn't pin it down. I still have no idea > how I managed to get the cookies in that state but now I know what > caused it ;-). Strange. I have never seen that happen. What browser are you using? - Dave -- http://www.object-craft.com.au From djc at object-craft.com.au Thu Aug 7 22:04:12 2003 From: djc at object-craft.com.au (Dave Cole) Date: 07 Aug 2003 22:04:12 +1000 Subject: [patch] explicitly set cookie path (was Re: [albatross-users] [bug] cookie path is never set) In-Reply-To: <3F2E9040.8040709@pollenation.net> References: <3F2E86C0.6000401@pollenation.net> <3F2E9040.8040709@pollenation.net> Message-ID: > Patch attached, seems to work ok for both session file and session > server but please review the change. > > There's a bit of repetition in session.py and sessionfile.py but > I'll let someone else take the blame for any refactoring that breaks > everything ;-). The patch looks OK to me. Thanks Matt. - Dave -- http://www.object-craft.com.au From djc at object-craft.com.au Thu Aug 7 22:15:41 2003 From: djc at object-craft.com.au (Dave Cole) Date: 07 Aug 2003 22:15:41 +1000 Subject: [albatross-users] how to play with the samples ? In-Reply-To: <1059945958.17185.21.camel@localhost> References: <20030727204021.22065.qmail@web11503.mail.yahoo.com> <1059945958.17185.21.camel@localhost> Message-ID: > 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. I did do some initial reorganisation of the samples to allow most of them to function under al-httpd. I need to finish that work for the next release and add a small chapter/section discussing the deployment options. The wiki page just added by Matt is an excellent start. http://www.object-craft.com.au/projects/albatross/wiki/DeploymentOptions - Dave -- http://www.object-craft.com.au From djc at object-craft.com.au Thu Aug 7 22:18:41 2003 From: djc at object-craft.com.au (Dave Cole) Date: 07 Aug 2003 22:18:41 +1000 Subject: [albatross-users] Bug in 1.10 w/ mod_python 2.7.8 / Apache 1.3 In-Reply-To: <200307240801.SAA24259@lightning.itga.com.au> References: <200307240801.SAA24259@lightning.itga.com.au> Message-ID: > Using checkboxes in a form works fine as a CGI and under mod_python > 3 on Apache 2, but causes an exception under mod_python 2.7.8 on > Apache 1.3. > > > Traceback (most recent call last): > File "/usr/local/lib/python2.1/site-packages/albatross/app.py", line 246, in run > self.merge_request(ctx) > File "/usr/local/lib/python2.1/site-packages/albatross/app.py", line 326, in merge_request > ctx.merge_request() > File "/usr/local/lib/python2.1/site-packages/albatross/context.py", line 309, in merge_request > value = self.request.field_value(name) > File "/usr/local/lib/python2.1/site-packages/albatross/cgiapp.py", line 33, in field_value > return [f.value for f in field] > AttributeError: value > > In mod_python 3 the elements of field[] are > mod_python.util.StringField objects, under mod_python2 they are > strings. > > (I never ran albatross 1.01 under mod_python 2 so this may be an old > bug.) > > The attached patch seems to fix it: Thanks Greg. I will merge the patch tomorrow. - Dave -- http://www.object-craft.com.au From fabbe at paniq.net Thu Aug 7 22:35:50 2003 From: fabbe at paniq.net (Fabian Fagerholm) Date: 07 Aug 2003 15:35:50 +0300 Subject: [albatross-users] Update: Debian package of Albatross 1.10 In-Reply-To: References: <1060243261.741.26.camel@kernel> Message-ID: <1060259749.734.89.camel@kernel> On Thu, 2003-08-07 at 14:50, Dave Cole wrote: > You are right. I suppose I should send them a message telling them > that I think they have made a very bad decision with their font > handling for EPS generation. They have thrown all font hinting > technology out of the window and claim the feature as a clever move > :-). Yes, it's explained in http://www.lysator.liu.se/~alla/dia/fonts.html Apparently, they've had a lot of trouble with the fonts earlier, and have made this sacrifice in order to fix the other issues. But it's a bad idea; it breaks many things, such as PDF conversion. See http://bugzilla.gnome.org/show_bug.cgi?id=114372 Perhaps this remaning issue could be fixed without reintroducing the previous mess. But there are other issues as well. dia now expects to have been run before when using the --export option (it looks for the ~/.dia directory), and regardless of that and the --nosplash switch, it bails out if it can't find a valid DISPLAY environment variable. Will you talk to them about the font stuff? Cheers, -- Fabian Fagerholm -------------- next part -------------- A non-text attachment was scrubbed... Name: signature.asc Type: application/pgp-signature Size: 189 bytes Desc: This is a digitally signed message part URL: From fabbe at paniq.net Thu Aug 7 22:53:52 2003 From: fabbe at paniq.net (Fabian Fagerholm) Date: 07 Aug 2003 15:53:52 +0300 Subject: [albatross-users] Update: Debian package of Albatross 1.10 In-Reply-To: <1060259749.734.89.camel@kernel> References: <1060243261.741.26.camel@kernel> <1060259749.734.89.camel@kernel> Message-ID: <1060260832.957.92.camel@kernel> On Thu, 2003-08-07 at 15:35, Fabian Fagerholm wrote: > Will you talk to them about the font stuff? I've filed bugs 119329 and 119331 (http://bugzilla.gnome.org/show_bug.cgi?id=119329 and http://bugzilla.gnome.org/show_bug.cgi?id=119331 , respectively) about the issues with automatic document generation. Haven't done anything about the font stuff, though. -- Fabian Fagerholm -------------- next part -------------- A non-text attachment was scrubbed... Name: signature.asc Type: application/pgp-signature Size: 189 bytes Desc: This is a digitally signed message part URL: From matt at pollenation.net Thu Aug 7 23:49:35 2003 From: matt at pollenation.net (Matt Goodall) Date: Thu, 07 Aug 2003 14:49:35 +0100 Subject: [albatross-users] [bug] cookie path is never set In-Reply-To: References: <3F2E86C0.6000401@pollenation.net> Message-ID: <3F3258EF.2000504@pollenation.net> Dave Cole wrote: >>Note that this bug is unlikely to affect non-random apps since they >>don't use page paths. However, I have definitely seen a case where I >>had two cookies set for a non-random application which caused all >>sorts of fun with session management. I didn't know why it was >>happening at the time and couldn't pin it down. I still have no idea >>how I managed to get the cookies in that state but now I know what >>caused it ;-). >> >> > >Strange. I have never seen that happen. What browser are you using? > Mozilla (of course!), but I have no idea which version. I wouldn't worry about this too much, I never managed to repeat it again and it's possible it was just me when I was experimenting. Perhaps I requested /some/path/app.py and then /some/path/app.py/, that might cause it. Cheers, Matt -- Matt Goodall, Pollenation Internet Ltd w: http://www.pollenationinternet.com e: matt at pollenation.net t: +44 (0)113 2252500 From matt at pollenation.net Fri Aug 8 11:01:08 2003 From: matt at pollenation.net (Matt Goodall) Date: 08 Aug 2003 02:01:08 +0100 Subject: [albatross-users] Request for pre-specification enlightenment In-Reply-To: <1060239299.3f31f7c3b4cb7@webmail.provico.fi> References: <1060239299.3f31f7c3b4cb7@webmail.provico.fi> Message-ID: <1060304467.15636.198.camel@localhost> On Thu, 2003-08-07 at 07:54, Max Romantschuk wrote: > Now, here's what we wish to do: > > A simple content management system, consisting of two main parts. The site-view, > which is what all the nice users will see, and the admin-view, which we will see. > > These two views need to show the same data, but in different perspective > (presentation versus content-creation). Just a thought but, depending on how integrated you want the site- and admin-view parts to be, you *might* want to think about creating two, distinct applications. Obviously, they can share common modules. Whatever you think of that idea ... For the site-view you will almost certainly want to use the random page mixins which will allow the site's pages to be bookmarked by users and indexed by search engines. * http://object-craft.com.au/projects/albatross/albatross/app-random.html * http://object-craft.com.au/projects/albatross/albatross/mixin-randpage-module.html You may also want to consider overriding get_page_from_uri() (from the RandomPageModuleMixin) in your application class to handle your pure content rendering requirements. That will allow you to have URLs like /about_me and /weblog/2003-08-08 rather than /index.php?pg=about_me, for example. * http://object-craft.com.au/projects/albatross/albatross/mixin-randpage-module.html * http://object-craft.com.au/projects/albatross/wiki/get_5fpage_5ffrom_5furi_28_29_20example You can also use the above technique with methods of the ResponseMixin to send other type of data, such as images, to the browser. Obviously, letting the web server handle this is more efficient but you could then store your images in a content store/database along with all the other content if you wanted to. * http://object-craft.com.au/projects/albatross/wiki/Sending_20non_2dHTML_20content The admin-view can be either random or not, it depends on your preference. The one thing I would point out is that the non-random page mixins (PageObjectMixin and PageModuleMixin) provide a nicer page lifecycle that gives you more control over session management. That can be very useful for data editing as it provides obvious hooks (page_enter and page_leave) for when to create and destroy session data. * http://object-craft.com.au/projects/albatross/albatross/mixin-page-module.html > The system should meet the following requirements: > > There must be a simple but extendable authentication framework. You might consider putting the authentication checks in your application class rather than in the page modules to avoid code duplication. The Albatross application classes and mixins will probably have a convenient method you can override to add the authentication hooks. Some time ago now, Sheila King posted some example code which included authentication. I'm not sure how it was implemented but that might help you if the code is still available. You'll have to search through the mailing list archive for more on that. > The system will use a simple tree-based approach to organize content. The tree > determines the navigation at the same time. As Tim Churches mentioned, the tag will help if you need to render trees structures. * http://object-craft.com.au/projects/albatross/albatross/tag-tree.html > The tree approach enables some neat tricks to be done with relative ease. A > document can serve as a parent for images shown in the document. An image > gallery can serve as a parent for images shown in the gallery, etc. Sounds like you could have a different template for each type of "object" that is being displayed - one for a document, one for an image gallery, one for a full-size image etc. What about the case when two documents both include a single image? Might the concept of an image library be better? That probably depends on how far you want to take the application. > There should also be a master-template showing the navigation and other global > stuff. An area of the master template is reserved for the actual content to be > displayed. The master teplate should therefore be able to switch the view in the > content area based upon context. Sounds like a job for the (horribly named) macros mechanism. Your document template file (for example) could be something like: ... document title ... ... document content ... where all the navigation, layout etc is contained in a the "master" macro. * http://object-craft.com.au/projects/albatross/albatross/tug-content2.html I have no idea why I hate the term macro but I do, so there ;-). > > The following features are planned: > Documents, consisting of XHTML-data You should have no problem here. The Albatross templating system does very little messing around with your HTML content. The provided HTML custom tags have a philosophy of passing any unrecognised attributes through to the HTML code unchanged. > Files and Images > Weblog > Image gallery I can't think of why any of these would be difficult for Albatross As as aside, I have considered writing a gallery application myself ... just so that I can remove all remnants of PHP from my computer ;-). The other application I really want is a combined weblog/wiki, something like SnipSnap but in Python rather than Java so not *all* the RAM is used up ;-). Here are some pointers to other tools that might be useful: * Python Imaging Library, http://www.pythonware.com/products/pil * Some form of structured text processor, i.e. * docutils, http://docutils.sourceforge.net * PyTextile, http://diveintomark.org/projects/pytextile * etc > My current homepage is at http://max.nma.fi/ Feel free to take a look at what > I'm trying to replace. I'm not sure how effective Albatross would be as a streaming media server for your MP3s. ;-) > I realize this description is vague, and that the approach I've envisioned may > not suit the Albatross environment. I therefore hope that the members of the > list can help us in finding a sensible approach, while still maintaining our goals. I think Albatross can handle this type of application relatively easily, it's quite flexible and very easy to use (at least, I think so). Of course, just writing it in Python provides a number of benefits. I would not recommend trying to implement a full CMS in Albatross, or anything else for that matter, when something like Zope (http:///www.zope.org) is available. Although, Albatross is more fun and **considerably** more light weight. > Now then... bring on the hailstorm of bashing please. Oh right, why didn't you say so earlier! What a ridiculous idea for an application this is! You come in here asking for guidance, even daring to use the letters P, H & P together and you expect us to jump in and help. Ahem ... will that do? :) Hope this helps. As you can probably tell, Albatross has ways of doing most things quite nicely but it's really not difficult to use. Please ask if there is anything you are unsure of. Cheers, Matt -- Matt Goodall, Pollenation Internet Ltd w: http://www.pollenation.net e: matt at pollenation.net t: +44 (0)113 2252500 From max at provico.fi Fri Aug 8 15:34:25 2003 From: max at provico.fi (Max Romantschuk) Date: Fri, 8 Aug 2003 08:34:25 +0300 Subject: [albatross-users] Request for pre-specification enlightenment In-Reply-To: <1060304467.15636.198.camel@localhost> References: <1060239299.3f31f7c3b4cb7@webmail.provico.fi> <1060304467.15636.198.camel@localhost> Message-ID: <1060320865.3f3336612c33b@webmail.provico.fi> Please note: No time to proofread, should be working... OK... I think Matt just saved me a huge bulk of research work, Thanks! Here's the short version: I'm pretty much convinced the information supplied will get me started quite easily. I'll return with specific questions when I get that far. As for the comparison of Albatross and ColdFusion... I haven't yet really used Albatross so I don't really think I can pass proper judgement. I can tell you that ColdFusion is a bit like Perl, great for rapid development but really non-maintainable in the long run. From a linguistic perspective ColdFusion is really ugly. ColdFusion has some good things though, mostly excellent (read unified and easy to use) database integration and bundled indexing and search capabilities. In any case I wouln't recommend ColdFusion over PHP, Perl, Python or Java in a larger application. For small applications most languages keep things bearable if you know your stuff, so ColdFusion is OK for that. The thing is I really use ColdFusion only because my boss makes me ;) Quoting Matt Goodall : > Just a thought but, depending on how integrated you want the site- and > admin-view parts to be, you *might* want to think about creating two, > distinct applications. Obviously, they can share common modules. > Whatever you think of that idea ... I probably will do just that. An interface oprimized for editing usually looks ugly, and vice versa. > For the site-view you will almost certainly want to use the random page > mixins which will allow the site's pages to be bookmarked by users and > indexed by search engines. Sounds very sensible. > You may also want to consider overriding get_page_from_uri() (from the > RandomPageModuleMixin) in your application class to handle your pure > content rendering requirements. That will allow you to have URLs like > /about_me and /weblog/2003-08-08 rather than /index.php?pg=about_me, for > example. I won't consider it, I will make sure to do so. > You can also use the above technique with methods of the ResponseMixin > to send other type of data, such as images, to the browser. Obviously, > letting the web server handle this is more efficient but you could then > store your images in a content store/database along with all the other > content if you wanted to. I will, as I want a unified structure. Also this lets me store multiple files of the same name on the server (storing by an indexed name or in a database, then serving separately), while avoiding overwrite / nameclash issues. > You might consider putting the authentication checks in your application > class rather than in the page modules to avoid code duplication. The > Albatross application classes and mixins will probably have a convenient > method you can override to add the authentication hooks. This is still very open. I'm researching if I could hook into method calls on the underlying logic level and make the authentication granular without huge extra effort and/or overhead. In any case I don't know enough about the inner workings of Albatross to approach this just yet... > Some time ago now, Sheila King posted some example code which included > authentication. I'm not sure how it was implemented but that might help > you if the code is still available. You'll have to search through the > mailing list archive for more on that. Thanks, I'll have a look. > Sounds like you could have a different template for each type of > "object" that is being displayed - one for a document, one for an image > gallery, one for a full-size image etc. > > What about the case when two documents both include a single image? > Might the concept of an image library be better? That probably depends > on how far you want to take the application. I prefer to have 2 images which happen to look the same. I've been on projects where data was shared in multiple places for a bunch of reasons, and this may force you into one of three situations: 1. Don't edit stuff in fear of messing up some other data hidden in place X. 2. Lock down data which is shared and/or build huge amounts of logic to check all over the place. 3. Build a versioning system. In any case, I'd rather have some duplication and keep things simple :) > > There should also be a master-template showing the navigation and other > global > > stuff. An area of the master template is reserved for the actual content to > be > > displayed. The master teplate should therefore be able to switch the view > in the > > content area based upon context. > > Sounds like a job for the (horribly named) macros mechanism. Your > document template file (for example) could be something like: > > > ... document title ... > ... document content ... > > > where all the navigation, layout etc is contained in a the "master" > macro. That sounds like a good idea. I'll have to learn all about macros then. They were those things in Excel, right? ;) > As as aside, I have considered writing a gallery application myself ... > just so that I can remove all remnants of PHP from my computer ;-). The > other application I really want is a combined weblog/wiki, something > like SnipSnap but in Python rather than Java so not *all* the RAM is > used up ;-). OK... for now I'll think we'll keep this between me and Fabian, but I promise to make the code available, when it's ready. > > My current homepage is at http://max.nma.fi/ Feel free to take a look at > what > > I'm trying to replace. > > I'm not sure how effective Albatross would be as a streaming media > server for your MP3s. ;-) I think I'll let mp3.com serve that for now... we'll see about version 2 ;) > I would not recommend trying to implement a full CMS in Albatross, or > anything else for that matter, when something like Zope > (http:///www.zope.org) is available. Although, Albatross is more fun and > **considerably** more light weight. Yes. I tried Zope, but found that it was just too huge and not quite as stable as I wished for. I guess there are just too many moving parts to get your head around with only so much free time to spare. > > Now then... bring on the hailstorm of bashing please. > > Oh right, why didn't you say so earlier! What a ridiculous idea for an > application this is! You come in here asking for guidance, even daring > to use the letters P, H & P together and you expect us to jump in and > help. Ahem ... will that do? :) I laugh at your puny attempts to ridicule me. Hah! (todo: insert joke about herring slapping) > Hope this helps. As you can probably tell, Albatross has ways of doing > most things quite nicely but it's really not difficult to use. Please > ask if there is anything you are unsure of. I'll be sure to start crying once I get stuck first. Thanks Matt! .: Max Romantschuk .: http://max.nma.fi/ .: http://www.mp3.com/romax/ From matt at pollenation.net Fri Aug 8 19:17:52 2003 From: matt at pollenation.net (Matt Goodall) Date: Fri, 08 Aug 2003 10:17:52 +0100 Subject: [albatross-users] Request for pre-specification enlightenment In-Reply-To: <1060320865.3f3336612c33b@webmail.provico.fi> References: <1060239299.3f31f7c3b4cb7@webmail.provico.fi> <1060304467.15636.198.camel@localhost> <1060320865.3f3336612c33b@webmail.provico.fi> Message-ID: <3F336AC0.1050406@pollenation.net> Max Romantschuk wrote: >Quoting Matt Goodall : > > >>Just a thought but, depending on how integrated you want the site- and >>admin-view parts to be, you *might* want to think about creating two, >>distinct applications. Obviously, they can share common modules. >>Whatever you think of that idea ... >> >> > >I probably will do just that. An interface oprimized for editing usually looks >ugly, and vice versa. > That's very true but Albatross does not place any restrictions on how your site should look and feel so you could probably work around any issues. I was actually thinking more from an application architecture point of view. It's quite common to have different authentication and session management requirements for the site- and admin- views; sometimes the site navigation for the two parts is completely different; sometimes the application parts live at different URLs; sometimes the only connection between the site- and admin-view is the data. However, for a wiki style application splitting the application into two would be the wrong thing to do. >>I would not recommend trying to implement a full CMS in Albatross, or >>anything else for that matter, when something like Zope >>(http:///www.zope.org) is available. Although, Albatross is more fun and >>**considerably** more light weight. >> >> > >Yes. I tried Zope, but found that it was just too huge and not quite as stable >as I wished for. I guess there are just too many moving parts to get your head >around with only so much free time to spare. > I'm surprised you didn't find Zope stable enough. I haven't used it for about 18 months now but I didn't have much trouble with it. The learning curve is quite steep at first though. >>>Now then... bring on the hailstorm of bashing please. >>> >>> >>Oh right, why didn't you say so earlier! What a ridiculous idea for an >>application this is! You come in here asking for guidance, even daring >>to use the letters P, H & P together and you expect us to jump in and >>help. Ahem ... will that do? :) >> >> > >I laugh at your puny attempts to ridicule me. Hah! > >(todo: insert joke about herring slapping) > Phew, I'm glad to took that as the humour as intended. I posted it and thought, "oh no, what if it's taken the wrong way". ;-) Cheers, Matt -- Matt Goodall, Pollenation Internet Ltd w: http://www.pollenationinternet.com e: matt at pollenation.net t: +44 (0)113 2252500 From max at provico.fi Fri Aug 8 19:34:40 2003 From: max at provico.fi (Max Romantschuk) Date: Fri, 8 Aug 2003 12:34:40 +0300 Subject: [albatross-users] Request for pre-specification enlightenment In-Reply-To: <3F336AC0.1050406@pollenation.net> References: <1060239299.3f31f7c3b4cb7@webmail.provico.fi> <1060304467.15636.198.camel@localhost> <1060320865.3f3336612c33b@webmail.provico.fi> <3F336AC0.1050406@pollenation.net> Message-ID: <1060335280.3f336eb0a8c3f@webmail.provico.fi> Quoting Matt Goodall : > I was actually thinking more from an application architecture point of > view. It's quite common to have different authentication and session > management requirements for the site- and admin- views; sometimes the > site navigation for the two parts is completely different; sometimes the > application parts live at different URLs; sometimes the only connection > between the site- and admin-view is the data. > > However, for a wiki style application splitting the application into two > would be the wrong thing to do. Right now I think the probable outcome is that the site and admin side will share the model, having different views and controllers. Whatever that results in in Albatross terminology ;) > I'm surprised you didn't find Zope stable enough. I haven't used it for > about 18 months now but I didn't have much trouble with it. The learning > curve is quite steep at first though. The stability issue might well be my own fault. The learning curve is, as you say, quite steep. If I could dedicate enough time Zope would be good to learn properly, as I've only skimmed the surface. Zope does have the "do things the Zope way"-issue though. Then again I rather like the Zope way. > >I laugh at your puny attempts to ridicule me. Hah! > > > >(todo: insert joke about herring slapping) > > > Phew, I'm glad to took that as the humour as intended. I posted it and > thought, "oh no, what if it's taken the wrong way". ;-) Don't worry about offending me, it usually requires more stupidity than the average coder posesses... .: Max Romantschuk .: http://max.nma.fi/ .: http://www.mp3.com/romax/ From max at provico.fi Fri Aug 8 21:54:45 2003 From: max at provico.fi (Max Romantschuk) Date: Fri, 8 Aug 2003 14:54:45 +0300 Subject: [albatross-users] Question about Albatross tags and unknown attributes Message-ID: <1060343685.3f338f85be1ec@webmail.provico.fi> I've been studying the documentation, and I started wondering something about Albatross tags... Do the tags pass through unknown attributes transparently? I'm sure it says somewhere, but I didn't find the answer yet ;) An example: Say I've got a form which needs a number between 1 and 10 in an input field. I could naturally do server side checking, but from an UI-perspective JavaScript-based client-side checking may often be better. I would then make suitable logic and put the checks in the form's onsubmit-handler. Would that work? Disclaimer: Still at work and no installation to experiment with ;) .: Max Romantschuk .: http://max.nma.fi/ .: http://www.mp3.com/romax/ From matt at pollenation.net Fri Aug 8 22:59:22 2003 From: matt at pollenation.net (Matt Goodall) Date: Fri, 08 Aug 2003 13:59:22 +0100 Subject: [albatross-users] Question about Albatross tags and unknown attributes In-Reply-To: <1060343685.3f338f85be1ec@webmail.provico.fi> References: <1060343685.3f338f85be1ec@webmail.provico.fi> Message-ID: <3F339EAA.7040005@pollenation.net> Max Romantschuk wrote: >I've been studying the documentation, and I started wondering something about >Albatross tags... Do the tags pass through unknown attributes transparently? > Yes, all the tags provided by Albatross pass unknown attributes straight through. There is actually a helper method, Tag.write_attribs_except(), that does most of the work - makes writing your own custom tags even simpler :). >I'm sure it says somewhere, but I didn't find the answer yet ;) > Hmm, I can't find it either. >An example: Say I've got a form which needs a number between 1 and 10 in an >input field. I could naturally do server side checking, but from an >UI-perspective JavaScript-based client-side checking may often be better. > >I would then make suitable logic and put the checks in the form's >onsubmit-handler. Would that work? > Yes, it should be fine. The names of the form and form elements would be as expected. Any attributes that install event handlers (onsubmit, onlick etc) would be passed through to the HTML unchanged. Cheers, Matt -- Matt Goodall, Pollenation Internet Ltd w: http://www.pollenationinternet.com e: matt at pollenation.net t: +44 (0)113 2252500 From esj at harvee.org Sat Aug 9 01:16:57 2003 From: esj at harvee.org (Eric S. Johansson) Date: Fri, 08 Aug 2003 11:16:57 -0400 Subject: [albatross-users] Question about Albatross tags and unknown attributes In-Reply-To: <3F339EAA.7040005@pollenation.net> References: <1060343685.3f338f85be1ec@webmail.provico.fi> <3F339EAA.7040005@pollenation.net> Message-ID: <3F33BEE9.4070408@harvee.org> Matt Goodall crafted: > Max Romantschuk wrote: > >> I'm sure it says somewhere, but I didn't find the answer yet ;) >> > Hmm, I can't find it either. if you remember, this was one of my questions a few months ago. It wasn't in the documentation then and to help from kinda members of this list to set me on the right path. although, I still find myself with a strange urge to accost members of wedding parties and tell them my long tale. --- eric From matt at pollenation.net Sun Aug 10 10:54:35 2003 From: matt at pollenation.net (Matt Goodall) Date: 10 Aug 2003 01:54:35 +0100 Subject: [albatross-users] page module problem Message-ID: <1060476874.23709.558.camel@localhost> I'm using a random app but I suspect the problem would occur with non-random apps too. If I store my page modules in a directory structure and two directories have a python module with the same name, something like this ... ./modules/one/list.py ./modules/two/list.py then **both** modules get imported with a name of 'list' (as seen in sys.modules.keys()). This happens because the directory structure is not considered a package structure, just somewhere to store modules. I'm trying to find a solution to this limitation but, so far, I'm not happy with the fix. I'm currently abusing the imp module in a truly horrible way by passing an application generated name to load_module() to stop the name clash. It goes something like this: dirname, filename = os.path.split(path) file, filepath, desc = imp.find_module(filename, [dirname]) mod_name = '_albatross_page_%s' % name.replace('/', '_') page = imp.load_module(mod_name, file, filepath, desc) Well, I did warn you it was horrible ;-). Another possibility is to use the execfile() builtin to (sort of) load the module into a blank namespace. This seems cleaner since it does not create a module but I'm concerned it might break things in ways I don't yet understand. It would probably also mean changing the way in which the page modules are cached. If anyone has more experience with this sort of thing I would be grateful for any ideas/help. Cheers, Matt -- Matt Goodall, Pollenation Internet Ltd w: http://www.pollenation.net e: matt at pollenation.net t: +44 (0)113 2252500 From matt at pollenation.net Sun Aug 10 12:03:29 2003 From: matt at pollenation.net (Matt Goodall) Date: 10 Aug 2003 03:03:29 +0100 Subject: [albatross-users] page module problem In-Reply-To: <1060476874.23709.558.camel@localhost> References: <1060476874.23709.558.camel@localhost> Message-ID: <1060481008.23709.601.camel@localhost> Could something like this be used: ns = {}; execfile('./modules/one/list.py', ns) page_enter = ns['page_enter'] ... page_enter(ctx) The namespace and the page methods could easily be cached (perhaps in some Page object) and it's still easy to reload the module if list.py is changed. Best of all nothing gets added to sys.modules so it's nice and clean. Can anyone think of any problems? Is this likely to break anything else? Cheers, Matt On Sun, 2003-08-10 at 01:54, Matt Goodall wrote: > I'm using a random app but I suspect the problem would occur with > non-random apps too. > > If I store my page modules in a directory structure and two directories > have a python module with the same name, something like this ... > > ./modules/one/list.py > ./modules/two/list.py > > then **both** modules get imported with a name of 'list' (as seen in > sys.modules.keys()). This happens because the directory structure is not > considered a package structure, just somewhere to store modules. > > I'm trying to find a solution to this limitation but, so far, I'm not > happy with the fix. I'm currently abusing the imp module in a truly > horrible way by passing an application generated name to load_module() > to stop the name clash. It goes something like this: > > dirname, filename = os.path.split(path) > file, filepath, desc = imp.find_module(filename, [dirname]) > mod_name = '_albatross_page_%s' % name.replace('/', '_') > page = imp.load_module(mod_name, file, filepath, desc) > > Well, I did warn you it was horrible ;-). > > Another possibility is to use the execfile() builtin to (sort of) load > the module into a blank namespace. This seems cleaner since it does not > create a module but I'm concerned it might break things in ways I don't > yet understand. It would probably also mean changing the way in which > the page modules are cached. > > If anyone has more experience with this sort of thing I would be > grateful for any ideas/help. > > Cheers, Matt -- Matt Goodall, Pollenation Internet Ltd w: http://www.pollenation.net e: matt at pollenation.net t: +44 (0)113 2252500 From djc at object-craft.com.au Sun Aug 10 20:58:40 2003 From: djc at object-craft.com.au (Dave Cole) Date: 10 Aug 2003 20:58:40 +1000 Subject: [albatross-users] Question about Albatross tags and unknown attributes In-Reply-To: <3F33BEE9.4070408@harvee.org> References: <1060343685.3f338f85be1ec@webmail.provico.fi> <3F339EAA.7040005@pollenation.net> <3F33BEE9.4070408@harvee.org> Message-ID: >>>>> "Eric" == Eric S Johansson writes: Eric> Matt Goodall crafted: >> Max Romantschuk wrote: >>> I'm sure it says somewhere, but I didn't find the answer yet ;) >>> >> Hmm, I can't find it either. Eric> if you remember, this was one of my questions a few months ago. Eric> It wasn't in the documentation then and to help from kinda Eric> members of this list to set me on the right path. Just added this to section 5,2 of the documentation: All attributes that are not recognised by Albatross are passed without modification to the generated HTML. - Dave -- http://www.object-craft.com.au From djc at object-craft.com.au Sun Aug 10 21:17:24 2003 From: djc at object-craft.com.au (Dave Cole) Date: 10 Aug 2003 21:17:24 +1000 Subject: [albatross-users] page module problem In-Reply-To: <1060476874.23709.558.camel@localhost> References: <1060476874.23709.558.camel@localhost> Message-ID: > I'm using a random app but I suspect the problem would occur with > non-random apps too. > > If I store my page modules in a directory structure and two > directories have a python module with the same name, something like > this ... > > ./modules/one/list.py > ./modules/two/list.py > > then **both** modules get imported with a name of 'list' (as seen in > sys.modules.keys()). This happens because the directory structure is > not considered a package structure, just somewhere to store modules. > > I'm trying to find a solution to this limitation but, so far, I'm > not happy with the fix. I'm currently abusing the imp module in a > truly horrible way by passing an application generated name to > load_module() to stop the name clash. It goes something like this: > > dirname, filename = os.path.split(path) > file, filepath, desc = imp.find_module(filename, [dirname]) > mod_name = '_albatross_page_%s' % name.replace('/', '_') > page = imp.load_module(mod_name, file, filepath, desc) > > Well, I did warn you it was horrible ;-). > > Another possibility is to use the execfile() builtin to (sort of) > load the module into a blank namespace. This seems cleaner since it > does not create a module but I'm concerned it might break things in > ways I don't yet understand. It would probably also mean changing > the way in which the page modules are cached. > > If anyone has more experience with this sort of thing I would be > grateful for any ideas/help. It might make more sense to require that applications use a proper Python directory structure for page modules. All that means is you need to have an __init__.py in each page module directory. Once this has been done then the relevant code in the PageModuleMixin load_page_module() method could be changed to this: def load_page_module(self, ctx, name): if self.__base_dir == '.': path = name else: path = os.path.join(self.__base_dir, name) page = self.__cache.get(path) if page: mtime = os.stat(page.__file__)[stat.ST_MTIME] if mtime > page.__mtime__: reload(page) page.__mtime__ = mtime if not page: # # Name must be a fully qualified page module relative to # the base module directory. RandomPageModule must change # 'one/list' to 'one.list' so we can import here. # file, filepath, desc = imp.find_module(name, [self.__base_dir]) page = sys.modules.get(name) if not page or not page.__file__.startswith(filepath): try: page = imp.load_module(name, file, filepath, desc) finally: if file: file.close() So all we do is delete the one line that causes the page module to be imported from the directory in which it lives. Then we cause the import to be from the module base directory. Seems a bit silly that it does not already do this. - Dave -- http://www.object-craft.com.au From djc at object-craft.com.au Sun Aug 10 21:40:57 2003 From: djc at object-craft.com.au (Dave Cole) Date: 10 Aug 2003 21:40:57 +1000 Subject: [albatross-users] Update: Debian package of Albatross 1.10 In-Reply-To: <1060259749.734.89.camel@kernel> References: <1060243261.741.26.camel@kernel> <1060259749.734.89.camel@kernel> Message-ID: >>>>> "Fabian" == Fabian Fagerholm writes: Fabian> On Thu, 2003-08-07 at 14:50, Dave Cole wrote: >> You are right. I suppose I should send them a message telling them >> that I think they have made a very bad decision with their font >> handling for EPS generation. They have thrown all font hinting >> technology out of the window and claim the feature as a clever move >> :-). Fabian> Yes, it's explained in Fabian> http://www.lysator.liu.se/~alla/dia/fonts.html Apparently, Fabian> they've had a lot of trouble with the fonts earlier, and have Fabian> made this sacrifice in order to fix the other issues. But it's Fabian> a bad idea; it breaks many things, such as PDF conversion. See Fabian> http://bugzilla.gnome.org/show_bug.cgi?id=114372 Perhaps this Fabian> remaning issue could be fixed without reintroducing the Fabian> previous mess. Fabian> But there are other issues as well. dia now expects to have Fabian> been run before when using the --export option (it looks for Fabian> the ~/.dia directory), and regardless of that and the Fabian> --nosplash switch, it bails out if it can't find a valid Fabian> DISPLAY environment variable. Fabian> Will you talk to them about the font stuff? I posted a new bug: http://bugzilla.gnome.org/show_bug.cgi?id=119547 -- http://www.object-craft.com.au From djc at object-craft.com.au Sun Aug 10 22:02:37 2003 From: djc at object-craft.com.au (Dave Cole) Date: 10 Aug 2003 22:02:37 +1000 Subject: [albatross-users] [patch] xhtml compliant input and img In-Reply-To: <1058744024.24789.6.camel@localhost> References: <1058744024.24789.6.camel@localhost> Message-ID: >>>>> "Matt" == Matt Goodall writes: Matt> Attached is a small patch to make the and Matt> tags produce xhtml compliant code. These tags do not enclose any Matt> content so they should always end in ' />'. The extra space is Matt> sometimes needed by the older browsers. Applied. Thanks. - Dave -- http://www.object-craft.com.au From max at provico.fi Mon Aug 11 00:39:17 2003 From: max at provico.fi (Max Romantschuk) Date: Sun, 10 Aug 2003 17:39:17 +0300 Subject: [albatross-users] Question about Albatross tags and unknown attributes In-Reply-To: References: <1060343685.3f338f85be1ec@webmail.provico.fi> <3F339EAA.7040005@pollenation.net> <3F33BEE9.4070408@harvee.org> Message-ID: <1060526357.3f365915d9275@webmail.provico.fi> > Just added this to section 5,2 of the documentation: > > All attributes that are not recognised by Albatross are passed > without modification to the generated HTML. > > - Dave Thanks to everyone for enlightening me and adding to the documentation in hope of less cluelessness in the future :) .: Max Romantschuk .: http://max.nma.fi/ .: http://www.mp3.com/romax/ From korg at darkqueen.org Thu Aug 14 14:07:17 2003 From: korg at darkqueen.org (Cameron Blackwood) Date: Thu, 14 Aug 2003 14:07:17 +1000 Subject: [albatross-users] Macro and links? Message-ID: <200308140407.h7E47HU17529@firewall.darkqueen.org> Macros and other -------------------------- OK, maybe my doc reading skills suck, but can someone tell me how to make this work? ---------------- 8< begin import albatross ctx = albatross.SimpleContext('.') albatross.Template(ctx, '', ''' value: remove button: ''').to_html(ctx) ctx.flush_content() albatross.Template(ctx, '', ''' Output: value :output ''').to_html(ctx) ctx.flush_content() ---------------- 8< end I have a list of things and I want a macro to print the value with a 'remove' button at the end. I cant see how to access the macro argument from an al-input (or how I'd do this with an unnamed arguement, but thats another story). Isnt adding other al-tags something that should be 'easy' in a macro, or am I doing something totally dumb here. If Im on the wrong track here then can someone hint at what I should be doing to display the items like I want (pagination would be nice, but Id rather actually get the thing working first ;) Doc error --------- More missing 'src="' stuff: http://www.object-craft.com.au/projects/albatross/albatross/app-popview2.html contains: -- / `Rev Dr' cam at darkqueen.org Roleplaying, virtual goth \ < http://darkqueen.org Poly, *nix, Python, C/C++, genetics, ATM > \ [+61 3] 9809 1523[h] skeptic, Evil GM(tm). Sysadmin for hire / ---------- Random Quote ---------- You should go home. From gnb at itga.com.au Thu Aug 14 15:01:55 2003 From: gnb at itga.com.au (Gregory Bond) Date: Thu, 14 Aug 2003 15:01:55 +1000 Subject: [albatross-users] Macro and links? In-Reply-To: Your message of Thu, 14 Aug 2003 14:07:17 +1000. Message-ID: <200308140501.PAA00671@lightning.itga.com.au> > > value: > remove button: > You can use tags as args to other tags. So try "> which will do what I think it is you are trying to achieve! From korg at darkqueen.org Thu Aug 14 15:58:55 2003 From: korg at darkqueen.org (Cameron Blackwood) Date: Thu, 14 Aug 2003 15:58:55 +1000 Subject: [albatross-users] Macro and links? In-Reply-To: Your message of "Thu, 14 Aug 2003 15:01:55 +1000." <200308140501.PAA00671@lightning.itga.com.au> Message-ID: <200308140558.h7E5wtn18156@firewall.darkqueen.org> Gregory Bond writes: | | > | > value: | > remove button: | > | | You can use tags as args to other tags. So try | | "> | | which will do what I think it is you are trying to achieve! Thanks... thats the solution. It just seems _soooo_ wrong though. Urg... No wonder I didnt try that ;) I think this should go in the docs on macros or at the very least on the wiki. cheers, cam -- / `Rev Dr' cam at darkqueen.org Roleplaying, virtual goth \ < http://darkqueen.org Poly, *nix, Python, C/C++, genetics, ATM > \ [+61 3] 9809 1523[h] skeptic, Evil GM(tm). Sysadmin for hire / ---------- Random Quote ---------- "I don't know why, but first C programs tend to look a lot worse than first programs in any other language (maybe except for fortran, but then I suspect all fortran programs look like `firsts')" (By Olaf Kirch) From korg at darkqueen.org Thu Aug 14 16:11:25 2003 From: korg at darkqueen.org (Cameron Blackwood) Date: Thu, 14 Aug 2003 16:11:25 +1000 Subject: [albatross-users] Macro and links? In-Reply-To: Your message of "Thu, 14 Aug 2003 15:58:55 +1000." Message-ID: <200308140611.h7E6BPA18361@firewall.darkqueen.org> "Cameron Blackwood" writes: | | | Gregory Bond writes: | | | | > | | > value: | | > remove button: | | > | | | | You can use tags as args to other tags. So try | | | | "> | | | | which will do what I think it is you are trying to achieve! | | Thanks... thats the solution. But it doesnt seem to work with a single argument macro, I guess because it doesnt set the variable in the namespace or something. Do single arg macro's have a default 'name' for the argument? -- / `Rev Dr' cam at darkqueen.org Roleplaying, virtual goth \ < http://darkqueen.org Poly, *nix, Python, C/C++, genetics, ATM > \ [+61 3] 9809 1523[h] skeptic, Evil GM(tm). Sysadmin for hire / ---------- Random Quote ---------- Never raise your hand to your children -- it leaves your midsection unprotected. -- Robert Orben From korg at darkqueen.org Thu Aug 14 16:33:35 2003 From: korg at darkqueen.org (Cameron Blackwood) Date: Thu, 14 Aug 2003 16:33:35 +1000 Subject: [albatross-users] Macro and links? In-Reply-To: Your message of "Thu, 14 Aug 2003 15:58:55 +1000." Message-ID: <200308140633.h7E6XZ718565@firewall.darkqueen.org> OK, so Macros are really stupid and are for text only, right... --------------------- 8< begin import albatross ctx = albatross.SimpleContext('.') ctx.locals.tuples=[ ('12312','(12312)'), ('44','(44)') ] albatross.Template(ctx, '', ''' MACRO[]macro ''').to_html(ctx) ctx.flush_content() albatross.Template(ctx, '', ''' Output: name: val: :output ''').to_html(ctx) ctx.flush_content() --------------------- 8< end --------------------- 8< output begin Output: name:12312val:(12312)MACRO[('12312', '(12312)')]macro name:44val:(44)MACRO[('44', '(44)')]macro :output --------------------- 8< output end -- / `Rev Dr' cam at darkqueen.org Roleplaying, virtual goth \ < http://darkqueen.org Poly, *nix, Python, C/C++, genetics, ATM > \ [+61 3] 9809 1523[h] skeptic, Evil GM(tm). Sysadmin for hire / ---------- Random Quote ---------- Public use of any portable music system is a virtually guaranteed indicator of sociopathic tendencies. -- Zoso From gnb at itga.com.au Thu Aug 14 16:59:59 2003 From: gnb at itga.com.au (Gregory Bond) Date: Thu, 14 Aug 2003 16:59:59 +1000 Subject: [albatross-users] Macro and links? In-Reply-To: Your message of Thu, 14 Aug 2003 16:33:35 +1000. Message-ID: <200308140659.QAA21962@lightning.itga.com.au> > OK, so Macros are really stupid and are for text only, right... Well, they are designed for producing/manipulating HTML, so yes they are "text only" (for some value of "text"). Does this make them "really stupid"? I don't think so. There are two things happening here: - al-value takes a python expression, evaluates it, and returns the result as a string. That's what al-value is for, and I cannot imagine what else it could possibly return. This example the expr returns a tuple, so al-value turns it into a string using str(). The result is "('12312','(12312)')" - Albatross is then being kind and doing HTML escaping on the result (' is the HTML way of specifying the single quote); you can turn this off with the noescape parameter to if you don't like it. I can't imagine what you expected this code fragment to produce if the above behaviour is considered broken. From andrewm at object-craft.com.au Thu Aug 14 18:58:33 2003 From: andrewm at object-craft.com.au (Andrew McNamara) Date: Thu, 14 Aug 2003 18:58:33 +1000 Subject: [albatross-users] Macro and links? In-Reply-To: Message from Gregory Bond of "Thu, 14 Aug 2003 15:01:55 +1000." <200308140501.PAA00671@lightning.itga.com.au> References: <200308140501.PAA00671@lightning.itga.com.au> Message-ID: <20030814085833.DC44A3CA49@coffee.object-craft.com.au> >> >> value: >> remove button: >> > >You can use tags as args to other tags. So try > > "> > >which will do what I think it is you are trying to achieve! I don't think you can nest albatross tags like this - the parser isn't sophisticated enough. Macro's aren't function calls, more's the pity. Sooner or later we're going to have to do something a little fancier - I want to make the "disabled" or "size" attributes on an determined under application control, and you can't currently do that. -- Andrew McNamara, Senior Developer, Object Craft http://www.object-craft.com.au/ From max at provico.fi Thu Aug 14 19:07:41 2003 From: max at provico.fi (Max Romantschuk) Date: Thu, 14 Aug 2003 12:07:41 +0300 Subject: [albatross-users] RandomPageModuleMixin implementation question Message-ID: <1060852061.3f3b515d83d68@webmail.provico.fi> Hello everyone, As some of you may remember we're planning to build a simple application in Ablatross together with Fabian Fagerholm for maintaining both our sites. I've been working things out and I'm in need of some guidance. We're planning to implement the content as a tree. Each node is an object can have it's own type (class). Here's a simple example: root page1 (document) page2 (document) subpage1 (document) weblog (weblog) image_gallery (image gallery) The names come first, the object type next. The urls for this example would work out like this: / /page1 /page2 /page2/subpage1 /weblog /image_gallery If I'm understanding thigs correctly I should be able to override the get_page_from_uri method in RandomPageModuleMixin, and therein build the necessary logic to figure out the type of object being displayed and deploy the necessary view. Within that page I should probably use macros to render common stuff like the basic page structure, navigation etc. Does this make sense? .: Max Romantschuk .: http://max.nma.fi/ .: http://www.mp3.com/romax/ From matt at pollenation.net Thu Aug 14 20:16:38 2003 From: matt at pollenation.net (Matt Goodall) Date: Thu, 14 Aug 2003 11:16:38 +0100 Subject: [albatross-users] RandomPageModuleMixin implementation question In-Reply-To: <1060852061.3f3b515d83d68@webmail.provico.fi> References: <1060852061.3f3b515d83d68@webmail.provico.fi> Message-ID: <3F3B6186.8080201@pollenation.net> Max Romantschuk wrote: [snip] >If I'm understanding thigs correctly I should be able to override the >get_page_from_uri method in RandomPageModuleMixin, and therein build the >necessary logic to figure out the type of object being displayed and deploy the >necessary view. > >Within that page I should probably use macros to render common stuff like the >basic page structure, navigation etc. > >Does this make sense? > Sounds alright to me. Cheers, Matt -- Matt Goodall, Pollenation Internet Ltd w: http://www.pollenationinternet.com e: matt at pollenation.net From matt at pollenation.net Thu Aug 14 22:00:26 2003 From: matt at pollenation.net (Matt Goodall) Date: Thu, 14 Aug 2003 13:00:26 +0100 Subject: [albatross-users] ctx.locals.__page__ for random pages Message-ID: <3F3B79DA.2090704@pollenation.net> Is there a good reason why __page__ isn't set in ctx.locals for random apps? It's quite a useful piece of information to have available, here's some uses: * Makes it easy to create a run_template() equivalent which can handle a relative path, no need to worry what path the page is in. * Can be used a namespace for session management. * Will help with getting page_enter() and page_leave() working for random apps. I'm not entirely sure where the best place to make the change is: possibly in RandomPageModuleMixin but changing PageModuleMixin would be better. Cheers, Matt -- Matt Goodall, Pollenation Internet Ltd w: http://www.pollenationinternet.com e: matt at pollenation.net From matt at pollenation.net Thu Aug 14 22:13:56 2003 From: matt at pollenation.net (Matt Goodall) Date: Thu, 14 Aug 2003 13:13:56 +0100 Subject: [albatross-users] ctx.locals.__page__ for random pages In-Reply-To: <3F3B79DA.2090704@pollenation.net> References: <3F3B79DA.2090704@pollenation.net> Message-ID: <3F3B7D04.2090503@pollenation.net> Actually, it would be really nice if run_template() could cope with template file paths relative to the current page path. If the template name starts with a '/' then it's relative to the TemplateLoaderMixin's base_dir, otherwise it's relative to that base_dir plus the os.path.dirname() of the page module. For a page module '/one/two/three/page.py' that would let you do: def page_display(ctx): ctx.runtemplate('page.html') rather than def page_display(ctx): ctx.runtemplate('one/two/three/page.html') I think this would only make sense for random apps though, where the page modules and template files live together. By the way, is it deliberate that the template name cannot start with a '/' at the moment? Cheers, Matt -- Matt Goodall, Pollenation Internet Ltd w: http://www.pollenationinternet.com e: matt at pollenation.net From korg at darkqueen.org Fri Aug 15 01:15:45 2003 From: korg at darkqueen.org (Cameron Blackwood) Date: Fri, 15 Aug 2003 01:15:45 +1000 Subject: [albatross-users] Macro and links? In-Reply-To: Your message of "Thu, 14 Aug 2003 18:58:33 +1000." <20030814085833.DC44A3CA49@coffee.object-craft.com.au> Message-ID: <200308141515.h7EFFj921233@firewall.darkqueen.org> Andrew McNamara writes: | | > | > "> | > | >which will do what I think it is you are trying to achieve! | | I don't think you can nest albatross tags like this - the parser isn't | sophisticated enough. I tinkered round and this worked: "> but this didnt: So I took that as a sign that I was doing the wrong thing and I abandoned the macro way of doing it. :) | | Macro's aren't function calls, more's the pity. Sooner or later we're | going to have to do something a little fancier - I want to make the | "disabled" or "size" attributes on an determined under | application control, and you can't currently do that. Yeah, I had a brainfart and somehow linked macros with functions. :-0 My problem today was that I had a list of items of the form: [ unique_id_number, non_unique_string ] and I wanted to have a nice neat little delete button (but a delete button that was tied to the id_number _AND_ the string). In the end I ended up using....
  • ID: string data:
In this way I have a removetuple_ID and then a hidden value that I can extract the string from. My app then searches through dir(ctx.locals) for anything of the form 'removetuple_XXX' and search for the data_removetuple_XXX which is the base64 encoded pickle of the string. It's ugly, but it works fine and it means that I can delete with ID and string without rereading my database again. (Dont ask :) What I learnt today: -------------------- * dont use macros for anything that is at all programatic or complex. * you need to base64 encode the pickle string or you'll be hitting your head a lot :) because it wont unpickle, but it looks like a pickle string until you look real close ;) * once you get over some of the confusing bits, you remember that albatross rocks :) | Andrew McNamara, Senior Developer, Object Craft cam -- / `Rev Dr' cam at darkqueen.org Roleplaying, virtual goth \ < http://darkqueen.org Poly, *nix, Python, C/C++, genetics, ATM > \ [+61 3] 9809 1523[h] skeptic, Evil GM(tm). Sysadmin for hire / ---------- Random Quote ---------- I feel partially hydrogenated! From neel at mediapulse.com Fri Aug 15 01:42:16 2003 From: neel at mediapulse.com (Michael C. Neel) Date: Thu, 14 Aug 2003 11:42:16 -0400 Subject: [albatross-users] Macro and links? Message-ID: * you need to base64 encode the pickle string or you'll be hitting your head a lot :) because it wont unpickle, but it looks like a pickle string until you look real close ;) Take a look at the Albatross source if you find the need to stick pickled objects into form fields. They have a very compact method that pickles, encodes, compresses, and MD5 hashes the object when you use the hidden field state mixin. The MD5 part is *very* important as pickled objects in python are *not* security checked and the object is client supplied. BTW, this is also a hats off to the albatross guys, I was very impressed when I read that code; it helped me solve some problems I had in a very elegant way ;) Mike From gnb at itga.com.au Fri Aug 15 08:59:06 2003 From: gnb at itga.com.au (Gregory Bond) Date: Fri, 15 Aug 2003 08:59:06 +1000 Subject: [albatross-users] Macro and links? In-Reply-To: Your message of Thu, 14 Aug 2003 18:58:33 +1000. Message-ID: <200308142259.IAA00789@lightning.itga.com.au> > > "> > I don't think you can nest albatross tags like this - the parser isn't > sophisticated enough. I did try it before I posted and it actually works..... this might be an accident, however! From matt at pollenation.net Fri Aug 15 21:19:25 2003 From: matt at pollenation.net (Matt Goodall) Date: 15 Aug 2003 12:19:25 +0100 Subject: [albatross-users] minor httpdapp fix Message-ID: <1060946365.23554.20.camel@localhost> I was discussing "Mutable default arguments" from "10 Python pitfalls" (http://zephyrfalcon.org/labs/python_pitfalls.html) with a colleague just the other day. The conversation went something like this: Him: Did you know about this? Me: Yes, it's a weird one isn't it. I don't do default arguments like that unless it's what I actually want. Him: Oh ok, what do you do instead? Me: I set the default argument to None and check inside the function. I've got an example here ... At which point I opened up the albatross.httpdapp module, paged down to HTTPServer.__init__() ... and discovered I'd done exactly the wrong thing for the static_resources arg! Oops :$. That code was in the httpapp patch I sent some time ago. I very much doubt it would ever cause a problem but could you add the obvious fix anyway. Cheers, Matt -- Matt Goodall, Pollenation Internet Ltd w: http://www.pollenation.net e: matt at pollenation.net From matt at pollenation.net Sat Aug 16 01:12:03 2003 From: matt at pollenation.net (Matt Goodall) Date: 15 Aug 2003 16:12:03 +0100 Subject: [albatross-users] [patch] httpdapp Message-ID: <1060960323.9573.16.camel@localhost> Attached is my latest patch (diff to 1.10) to the httpdapp module. The main reason for this change is that I got bored with the response time of the server for pages with lots of or big graphics so I implemented support for conditional GET. It seems to make enough of a difference to warrant the small amount of extra code. Please note that this is still really only a toy server but it's great for development and possibly useful as a server for embedded devices. Changes are as follows: Since last patch: * Fixed silly mistake on static_resources default argument to HTTPServer.__init__. * Added conditional GET support when sending static_resources ('Last-Modified', 'If-Modified-Since' headers). * Improved static resource error handling - you actually get a 404 now ;-) Since 1.10: * Support for serving static resources directly from the filesystem. * Cleaned up and simplified the request parsing to make use of cgiapp.RequestFields (at last!). * Supports file upload (looks ok after initial tests). Cheers, Matt -- Matt Goodall, Pollenation Internet Ltd w: http://www.pollenationinternet.com e: matt at pollenation.net t: +44 (0)113 2252500 -------------- next part -------------- A non-text attachment was scrubbed... Name: httpdapp.patch Type: text/x-patch Size: 7083 bytes Desc: not available URL: From sheila at thinkspot.net Sat Aug 16 03:39:13 2003 From: sheila at thinkspot.net (Sheila King) Date: Fri, 15 Aug 2003 10:39:13 -0700 Subject: [albatross-users] Duplicate Cookies after unhandled exception in Random SessionFile Message-ID: <915127684.1060943953@goddess> Hello again everybodeeee, I wanted to share a phenomenon that I have experienced repeatedly, and am able to reproduce, in the event that this is something that needs looking into.... This is a situation that I first became aware of when trying to debug all the problems I was having after I initially upgraded to 1.10. (See my previous whining at http://www.object-craft.com.au/pipermail/albatross-users/2003-July/000746.h tml and here http://www.object-craft.com.au/pipermail/albatross-users/2003-July/000728.h tml etc...) After extensive testing, I found out what was causing the problem, and why I was unable to see it and therefore assumed that Albatross was simply losing session variables. What was actually happening in that case (noted above) is this: (1) I finally narrowed my problem down to a particular page (module) in my app that was consistently creating this error, where other pages were fine. (2) This particular page had an incorrect relative path to an image file, resulting in a 404 for that image. The rest of the page was fine, except for that image. (3) Albatross would, as a result, try to run the Bad URL function, however, I had overridden the default Bad URL function with one of my own. Problem was, there was an error in that, as well. In my load_badurl_template(), there was a call to load an html template badurl.html that tried to use a local variable in the template, where the local variable had not been set already. (4) As what occurred in (3) was an unhandled exception, as one would expect the session was removed. However, the cookie was not. (5) Since there HAD been a valid, authenticated session, which was now no longer authenticated, this resulted in my app redirecting to the "expired session" page. At this point, there were two copies of the same, cookie from the previous session, with the session variables removed. It was only possible to figure out all of the above by sniffing packets, as it all happened so fast, I would just see it go right to the expired session page each time. (6) Now here is the kicker... The original session cookie did not get removed, but the session vars did, then in (5) the cookie got duplicated and there were TWO cookies with the exact same session ID. UPON TRYING TO RE-LOG IN what would happen is that a new cookie would be created, but one of the old cookies would still be there, resulting in two stored cookies for my app ID. That "bad" cookie would never leave, and I would never be able to establish another valid session unless I went into the browser preferences and edited (deleted) the cookies from my browser manually. Now, it seems to me that upon an unhandled exception, that the cookie should be removed too? At least, I never had this problem in 1.01 (I know, that does not necessarily mean anything). But something about random app redirects did change in 1.10 and I'm just wondering if this cookie-thing has been overlooked? I didn't mention this before for several reasons, not the least of which are I've been too busy to sit down and type this all up, and also I figured it was my fault anyhow, since I DID have boo-boos in my application. Two cascading boo-boos that managed to hide from me what was actually going on. However, in the meantime I had applied Matt Goodall's cookie path patch for session.py and sessionfile.py and thought that maybe I would not see this problem again. But it occurred again today, and not where I have cascading errors, and I did get the traceback for the unhandled exception displayed to the browser. But what happens now, is when I got to the login page to try and log in again, I get two cookies and am unable to establish a valid session without going into my browser preferences and manually deleting the cookies. OK, well, just sharing in case this is something that someone might want to look into... -- Sheila King http://www.thinkspot.net/sheila/ http://www.k12groups.org From alb-users at repose.cx Fri Aug 15 22:47:17 2003 From: alb-users at repose.cx (Damien Elmes) Date: Fri, 15 Aug 2003 22:47:17 +1000 Subject: [albatross-users] SERVER_NAME vs HTTP_HOST? Message-ID: <864r0jay0a.fsf@mobile.repose.cx> Howdy folks, I've just started playing with albatross, and I quite like it. One problem I've run into is that I do testing via HTTP tunneling over ssh - the hostname I surf to isn't the SERVER_NAME which is used in request's get_uri(). The following change seems to correct the problem for me, but I do not know if it will have unintended consequences. Any thoughts? --- /home/resolve/albatross-1.10/albatross/cgiapp.py 2003-07-12 14:42:51.000000000 +1000 +++ /usr/lib/python2.2/site-packages/albatross/cgiapp.py 2003-08-15 22:30:55.000000000 +1000 @@ -64,7 +64,7 @@ return self.__fcgi.env.get('PATH_INFO') def get_servername(self): - return os.environ.get('SERVER_NAME') + return os.environ.get('HTTP_HOST') def get_header(self, name): env_name = 'HTTP_' + name.upper().replace('-', '_') Cheers, -- Damien Elmes From matt at pollenation.net Sat Aug 16 18:54:38 2003 From: matt at pollenation.net (Matt Goodall) Date: 16 Aug 2003 09:54:38 +0100 Subject: [albatross-users] SERVER_NAME vs HTTP_HOST? In-Reply-To: <864r0jay0a.fsf@mobile.repose.cx> References: <864r0jay0a.fsf@mobile.repose.cx> Message-ID: <1061024078.23552.8.camel@localhost> On Fri, 2003-08-15 at 13:47, Damien Elmes wrote: > One problem I've run into is that I do testing via HTTP tunneling over > ssh - the hostname I surf to isn't the SERVER_NAME which is used in > request's get_uri(). Yes, the same thing happens with the httpdapp. I've been meaning to look into it but completely forgot. > The following change seems to correct the problem for me, but I do not > know if it will have unintended consequences. Any thoughts? I would think the patch is correct. Using SERVER_NAME probably breaks things on a virtual host setup and behind a ProxyPass/ProxyPassReverse too. Cheers, Matt -- Matt Goodall, Pollenation Internet Ltd w: http://www.pollenation.net e: matt at pollenation.net From matt at pollenation.net Sat Aug 16 19:02:46 2003 From: matt at pollenation.net (Matt Goodall) Date: 16 Aug 2003 10:02:46 +0100 Subject: [albatross-users] Duplicate Cookies after unhandled exception in Random SessionFile In-Reply-To: <915127684.1060943953@goddess> References: <915127684.1060943953@goddess> Message-ID: <1061024566.23552.15.camel@localhost> On Fri, 2003-08-15 at 18:39, Sheila King wrote: [snip] > However, in the meantime I had applied Matt Goodall's cookie path patch for > session.py and sessionfile.py and thought that maybe I would not see this > problem again. Oh, that's what I was going to suggest ;-). > But it occurred again today, and not where I have cascading errors, and I > did get the traceback for the unhandled exception displayed to the browser. > But what happens now, is when I got to the login page to try and log in > again, I get two cookies and am unable to establish a valid session without > going into my browser preferences and manually deleting the cookies. Is the problem easily repeatable? If so, can you check the path of the two (or more) cookies or, even better, distill the problem into a minimal example and post it here. Cheers, Matt -- Matt Goodall, Pollenation Internet Ltd w: http://www.pollenation.net e: matt at pollenation.net From djc at object-craft.com.au Sun Aug 17 20:18:12 2003 From: djc at object-craft.com.au (Dave Cole) Date: 17 Aug 2003 20:18:12 +1000 Subject: [albatross-users] ctx.locals.__page__ for random pages In-Reply-To: <3F3B79DA.2090704@pollenation.net> References: <3F3B79DA.2090704@pollenation.net> Message-ID: > Is there a good reason why __page__ isn't set in ctx.locals for > random apps? It's quite a useful piece of information to have > available, here's some uses: > > * Makes it easy to create a run_template() equivalent which can > handle a relative path, no need to worry what path the page is in. > * Can be used a namespace for session management. > * Will help with getting page_enter() and page_leave() working for > random apps. > > I'm not entirely sure where the best place to make the change is: > possibly in RandomPageModuleMixin but changing PageModuleMixin would > be better. For non-random page applications __page__ is already set when you enter load_page_module(). For the time being I think that the right place to set __page__ would be back in RandomPageModuleMixin. It is probably a good idea to use ctx.locals.__page__. in RandomPageModuleMixin.load_page() rather than ctx.locals.page_name. - Dave -- http://www.object-craft.com.au From djc at object-craft.com.au Sun Aug 17 20:35:32 2003 From: djc at object-craft.com.au (Dave Cole) Date: 17 Aug 2003 20:35:32 +1000 Subject: [albatross-users] ctx.locals.__page__ for random pages In-Reply-To: <3F3B7D04.2090503@pollenation.net> References: <3F3B79DA.2090704@pollenation.net> <3F3B7D04.2090503@pollenation.net> Message-ID: > Actually, it would be really nice if run_template() could cope with > template file paths relative to the current page path. If the > template name starts with a '/' then it's relative to the > TemplateLoaderMixin's base_dir, otherwise it's relative to that > base_dir plus the os.path.dirname() of the page module. > > For a page module '/one/two/three/page.py' that would let you do: > > def page_display(ctx): > ctx.runtemplate('page.html') > > rather than > > def page_display(ctx): > ctx.runtemplate('one/two/three/page.html') > > I think this would only make sense for random apps though, where the > page modules and template files live together. It would probably make sense for all types of application. Currently Albatross only really cares about current directory - although by passing absolute paths for template and module paths you can probably eliminate that as well. To do what you are talking about I think Albatross would need to develop an internal sense of current page module directory in order to resolve relative paths. In order to provide what I think you are asking for it is probably necessary to introduce one extra path to an Albatross application; the application root. Once you have specified the root you can make the page module and template directories relative to that root. In a sense Albatross currently uses the current working directory as an implicit application root. Then any page or template name beginning with / would be relative to the application root and any not beginning with / would be considered relative to the directory containing the current page module. Not sure how hard this would be... > By the way, is it deliberate that the template name cannot start > with a '/' at the moment? Nope. - Dave -- http://www.object-craft.com.au From djc at object-craft.com.au Sun Aug 17 20:40:01 2003 From: djc at object-craft.com.au (Dave Cole) Date: 17 Aug 2003 20:40:01 +1000 Subject: [albatross-users] SERVER_NAME vs HTTP_HOST? In-Reply-To: <864r0jay0a.fsf@mobile.repose.cx> References: <864r0jay0a.fsf@mobile.repose.cx> Message-ID: > Howdy folks, I've just started playing with albatross, and I quite > like it. Thanks. > One problem I've run into is that I do testing via HTTP tunneling > over ssh - the hostname I surf to isn't the SERVER_NAME which is > used in request's get_uri(). > > The following change seems to correct the problem for me, but I do > not know if it will have unintended consequences. Any thoughts? > > --- /home/resolve/albatross-1.10/albatross/cgiapp.py 2003-07-12 14:42:51.000000000 +1000 > +++ /usr/lib/python2.2/site-packages/albatross/cgiapp.py 2003-08-15 22:30:55.000000000 +1000 > @@ -64,7 +64,7 @@ > return self.__fcgi.env.get('PATH_INFO') > > def get_servername(self): > - return os.environ.get('SERVER_NAME') > + return os.environ.get('HTTP_HOST') > > def get_header(self, name): > env_name = 'HTTP_' + name.upper().replace('-', '_') Applied. - Dave -- http://www.object-craft.com.au From djc at object-craft.com.au Sun Aug 17 20:41:25 2003 From: djc at object-craft.com.au (Dave Cole) Date: 17 Aug 2003 20:41:25 +1000 Subject: [albatross-users] Duplicate Cookies after unhandled exception in Random SessionFile In-Reply-To: <1061024566.23552.15.camel@localhost> References: <915127684.1060943953@goddess> <1061024566.23552.15.camel@localhost> Message-ID: >>>>> "Matt" == Matt Goodall writes: Matt> On Fri, 2003-08-15 at 18:39, Sheila King wrote: [snip] >> However, in the meantime I had applied Matt Goodall's cookie path >> patch for session.py and sessionfile.py and thought that maybe I >> would not see this problem again. Matt> Oh, that's what I was going to suggest ;-). I am thinking that it might be a good idea to release 1.11 this week sometime. - Dave -- http://www.object-craft.com.au From matt at pollenation.net Mon Aug 18 00:38:35 2003 From: matt at pollenation.net (Matt Goodall) Date: 17 Aug 2003 15:38:35 +0100 Subject: [albatross-users] SERVER_NAME vs HTTP_HOST? In-Reply-To: References: <864r0jay0a.fsf@mobile.repose.cx> Message-ID: <1061131114.23921.3.camel@localhost> On Sun, 2003-08-17 at 11:40, Dave Cole wrote: > Applied. Dave, did you find time to make the same change for the other Request adapters? fcgiapp should be the same change; I think httpdapp is a matter of urlparse'ing the raw request; not sure about mod_python. Matt. -- Matt Goodall, Pollenation Internet Ltd w: http://www.pollenation.net e: matt at pollenation.net From matt at pollenation.net Mon Aug 18 00:46:34 2003 From: matt at pollenation.net (Matt Goodall) Date: 17 Aug 2003 15:46:34 +0100 Subject: [albatross-users] Duplicate Cookies after unhandled exception in Random SessionFile In-Reply-To: References: <915127684.1060943953@goddess> <1061024566.23552.15.camel@localhost> Message-ID: <1061131593.23921.11.camel@localhost> On Sun, 2003-08-17 at 11:41, Dave Cole wrote: > I am thinking that it might be a good idea to release 1.11 this week > sometime. That would be a great help to me! I've got my own, patched version of Albatross in a Subversion repository and it's probably getting more and more out of sync with your version. AFAIK, I've sent all my changes to the list but the sooner I can get my copy back to the "official" version the better. Matt -- Matt Goodall, Pollenation Internet Ltd w: http://www.pollenation.net e: matt at pollenation.net From matt at pollenation.net Mon Aug 18 01:01:08 2003 From: matt at pollenation.net (Matt Goodall) Date: 17 Aug 2003 16:01:08 +0100 Subject: [albatross-users] ctx.locals.__page__ for random pages In-Reply-To: References: <3F3B79DA.2090704@pollenation.net> Message-ID: <1061132468.205.20.camel@localhost> On Sun, 2003-08-17 at 11:18, Dave Cole wrote: > > Is there a good reason why __page__ isn't set in ctx.locals for > > random apps? > For non-random page applications __page__ is already set when you > enter load_page_module(). For the time being I think that the right > place to set __page__ would be back in RandomPageModuleMixin. Yep, that's where I made the change - I was too scared to change the rest of the code too ;-). > It is probably a good idea to use ctx.locals.__page__. in > RandomPageModuleMixin.load_page() rather than ctx.locals.page_name. Makes sense to me. I had wondered why it was using page_name there rather than the usual "private" style __something_or_other__ anyway. Cheers, Matt -- Matt Goodall, Pollenation Internet Ltd w: http://www.pollenation.net e: matt at pollenation.net From matt at pollenation.net Mon Aug 18 01:24:20 2003 From: matt at pollenation.net (Matt Goodall) Date: 17 Aug 2003 16:24:20 +0100 Subject: [albatross-users] ctx.locals.__page__ for random pages In-Reply-To: References: <3F3B79DA.2090704@pollenation.net> <3F3B7D04.2090503@pollenation.net> Message-ID: <1061133859.205.44.camel@localhost> On Sun, 2003-08-17 at 11:35, Dave Cole wrote: > > Actually, it would be really nice if run_template() could cope with > > template file paths relative to the current page path. If the > > template name starts with a '/' then it's relative to the > > TemplateLoaderMixin's base_dir, otherwise it's relative to that > > base_dir plus the os.path.dirname() of the page module. > > > > For a page module '/one/two/three/page.py' that would let you do: > > > > def page_display(ctx): > > ctx.runtemplate('page.html') > > > > rather than > > > > def page_display(ctx): > > ctx.runtemplate('one/two/three/page.html') > > > > I think this would only make sense for random apps though, where the > > page modules and template files live together. > > It would probably make sense for all types of application. OK. It would certainly be better if any changes are made to all types of app but would it be a bit weird for PageObjectMixin applications where there is no directory structure? By the way, the reason I said "this would only make sense for random apps" is because RandomModularXxxApp is the only one of the prepackaged application types where the page modules and the page templates live together in a single directory structure. Perhaps it's best to forget about this idea to avoid the complexity. It's something that is fairly easily to handle per application (once __page__ is set for random apps). > Currently Albatross only really cares about current directory - > although by passing absolute paths for template and module paths you > can probably eliminate that as well. > > To do what you are talking about I think Albatross would need to > develop an internal sense of current page module directory in order to > resolve relative paths. Isn't something like template_path + os.path.dirname(__page__) + template_file sufficient? > > In order to provide what I think you are asking for it is probably > necessary to introduce one extra path to an Albatross application; the > application root. Once you have specified the root you can make the > page module and template directories relative to that root. In a > sense Albatross currently uses the current working directory as an > implicit application root. > > Then any page or template name beginning with / would be relative to > the application root and any not beginning with / would be considered > relative to the directory containing the current page module. > > Not sure how hard this would be... I'm a bit Random app focussed but it was easy enough there. I wrote a quick function - run_template_relative(ctx, template) - that used os.path.dirname(ctx.locals.__page__) to work things out. I don't think I have the code anymore as I was trying to avoid wandering any further from your code base but it was fairly straightforward. I couldn't think of a reason why this couldn't be rolled into the normal run_template() method. > > By the way, is it deliberate that the template name cannot start > > with a '/' at the moment? > > Nope. OK ;-) Cheers, Matt -- Matt Goodall, Pollenation Internet Ltd w: http://www.pollenation.net e: matt at pollenation.net From sheila at thinkspot.net Mon Aug 18 02:11:27 2003 From: sheila at thinkspot.net (Sheila King) Date: Sun, 17 Aug 2003 09:11:27 -0700 Subject: [albatross-users] Duplicate Cookies after unhandled exception in Random SessionFile In-Reply-To: <1061024566.23552.15.camel@localhost> References: <915127684.1060943953@goddess> <1061024566.23552.15.camel@localhost> Message-ID: <8834723.1061111487@SHEILA-LAPTOP> --On Saturday, August 16, 2003 10:02 AM +0100 Matt Goodall wrote: > On Fri, 2003-08-15 at 18:39, Sheila King wrote: >> However, in the meantime I had applied Matt Goodall's cookie path patch >> for session.py and sessionfile.py and thought that maybe I would not >> see this problem again. > > Oh, that's what I was going to suggest ;-). > >> But it occurred again today, and not where I have cascading errors, and ... ... > > Is the problem easily repeatable? If so, can you check the path of the > two (or more) cookies or, even better, distill the problem into a > minimal example and post it here. Hrrrm (insert clearing throat sounds here). My web site was cracked this past week (a few days ago) and I had to delete it all and re-install everything fresh. It seems that when I re-installed Albatross I did not have the cookie-path patch applied to it. I had applied it earlier, and thought I'd made it part of my archive, but apparently not. :( If I do see this behavior again, I will distill it down to a simple example to demonstrate it. -- Sheila King http://www.thinkspot.net/sheila/ http://www.k12groups.org From sheila at thinkspot.net Tue Aug 26 04:29:35 2003 From: sheila at thinkspot.net (Sheila King) Date: Mon, 25 Aug 2003 11:29:35 -0700 Subject: [albatross-users] Duplicate Cookies after unhandled exception in Random SessionFile In-Reply-To: <1061024566.23552.15.camel@localhost> References: <915127684.1060943953@goddess> <1061024566.23552.15.camel@localhost> Message-ID: <569072142.1061810975@goddess> --On Saturday, August 16, 2003 10:02 AM +0100 Matt Goodall wrote: > On Fri, 2003-08-15 at 18:39, Sheila King wrote: > > [snip] > >> However, in the meantime I had applied Matt Goodall's cookie path patch >> for session.py and sessionfile.py and thought that maybe I would not >> see this problem again. > > Oh, that's what I was going to suggest ;-). > > >> But it occurred again today, and not where I have cascading errors, and >> I did get the traceback for the unhandled exception displayed to the >> browser. But what happens now, is when I got to the login page to try >> and log in again, I get two cookies and am unable to establish a valid >> session without going into my browser preferences and manually deleting >> the cookies. > > Is the problem easily repeatable? If so, can you check the path of the > two (or more) cookies or, even better, distill the problem into a > minimal example and post it here. > Just a "heads up" that I've been stung by the corrupted-double-cookie scenario again, and this time I have double- and triple-checked and I do have Matt Goodall's patched versions of session.py and sessionfile.py installed on my server, to explicitly set the cookie path. I know that this occurs as a result of the app throwing an unhandled exception. I'm using a RandomModularApp. I'll try to put together a simply example that illustrates this problem, but it is going to take me a good week or more until I have the time to sit down and do it. Just wanted to toss a "heads up" that this problem is still occurring. -- Sheila King http://www.thinkspot.net/sheila/ http://www.k12groups.org From rtjohan at syspres.com Tue Aug 26 06:22:17 2003 From: rtjohan at syspres.com (rtjohan at syspres.com) Date: Mon, 25 Aug 2003 13:22:17 -0700 Subject: [albatross-users] Albatross Production Ready / Typical use? In-Reply-To: <569072142.1061810975@goddess> Message-ID: <000701c36b46$94d8ba20$3c01a8c0@rjc800> Are there some large website that have been developed with Albatross? What type of sites (size/complexity/number of devlopers/intra vs. internet) is Albatross specifically well suited for? Is it being widely used? Seems like this list has been pretty quite. Maybe everyone is using it happily, the documentation is so good that nobody has questions, and the system is so reliable that no bugs are reported. The alternative is that its not being used very much. Thanks for any insight? Richard From neel at mediapulse.com Tue Aug 26 07:01:04 2003 From: neel at mediapulse.com (Michael C. Neel) Date: Mon, 25 Aug 2003 17:01:04 -0400 Subject: [albatross-users] Albatross Production Ready / Typical use? Message-ID: We use albatross *a lot* on some very large sites. Some very simple sites, where we just use the template language to act as a SSI on steriods, some very complex sites where I can't even imagine how I would solve it in perl and without albatross. The docs have improved 10-fold thanks to suggestions on this list and the hard work of the guys at object craft. Also, there is now a wiki up with lots of good tips. I think that the lack of questions recently is due to the new docs and wiki, that and albatross is pretty stable. I think the install base is pretty small compared to other options, but this is true of python as well. Albatross also is not the normal template package most expect either, and requires some shift in thinking to really use at it's best. I wish I could name the sites we have done in albatross, but I'd need clearance from work and clients :/ Mike > -----Original Message----- > From: rtjohan at syspres.com [mailto:rtjohan at syspres.com] > Sent: Monday, August 25, 2003 4:22 PM > To: albatross-users at object-craft.com.au > Subject: [albatross-users] Albatross Production Ready / Typical use? > > > Are there some large website that have been developed with Albatross? > What type of sites (size/complexity/number of devlopers/intra > vs. internet) > is Albatross specifically well suited for? > > Is it being widely used? Seems like this list has been pretty > quite. Maybe > everyone is using it happily, the documentation is so good > that nobody has > questions, and the system is so reliable that no bugs are > reported. The > alternative is that its not being used very much. > > Thanks for any insight? > Richard > > > _______________________________________________ > Albatross-users mailing list > Albatross-users at object-craft.com.au > https://www.object-craft.com.au/cgi-bin/mailman/listinfo/albat ross-users From matt at pollenation.net Tue Aug 26 09:03:18 2003 From: matt at pollenation.net (Matt Goodall) Date: 26 Aug 2003 00:03:18 +0100 Subject: [albatross-users] Albatross Production Ready / Typical use? In-Reply-To: <000701c36b46$94d8ba20$3c01a8c0@rjc800> References: <000701c36b46$94d8ba20$3c01a8c0@rjc800> Message-ID: <1061852597.11676.166.camel@localhost> On Mon, 2003-08-25 at 21:22, rtjohan at syspres.com wrote: > Are there some large website that have been developed with Albatross? > What type of sites (size/complexity/number of devlopers/intra vs. internet) > is Albatross specifically well suited for? I would say Albatross is very well suited for web _applications_ where managing state can become quite tricky, tedious and error prone. Having said that, it's working great for less stateful applications too. I'm using Albatross to develop a two-part application. It's actually two Albatross applications: a backend, highly stateful administration system and a public, more typical website. The other app I'm working on at the moment is a standalone, single-user application designed to run on the user's computer. In terms of application complexity I would say you have the same limitations that any application running in a web server process has. Albatross will certainly help reduce the complexity of the application code that processes HTTP requests but that's really all it does. The application (basically a controller) is easy to set up, session management is simple, the templating engine is powerful (custom tags are great!), etc. Intra vs Internet? Neither would be a problem for Albatross. Large applications are easy to manage but it's sufficiently lightweight that you could even deploy a whole suite of smaller, specialised applications on an intranet if that made sense. Albatross seems to have been used in quite diverse ways. I'm writing the apps mentioned above; I think Object Craft developed an embedded application; various people seem to be using it on intranets; it's used by a university (I think) for some form of statistical analysis; some are using it for large, high-volume sites; it's being used for the frontend to an open source spam filtering application. > Is it being widely used? Seems like this list has been pretty quite. The mailing list seems to have peaks and troughs, it's certainly quiet right now. I suspect everyone is quite busy, I know I am. Unfortunately, I don't know how many "everyone" is. > Maybe > everyone is using it happily, the documentation is so good that nobody has > questions, The documentation is very good and there's a wiki to back it up. When someone does have a problem the mailing list tends to get busier. > and the system is so reliable that no bugs are reported. Not many bugs come up. The ones that do are probably for so called "random" applications and they're often from me ;-). I /think/ I'm pushing this side of Albatross a bit harder than most other users though. The good news is that it's Python and the Albatross code is easy enough to follow so fixing bugs that do appear is generally quite easy. Please don't look back at the chaos one of my patches caused in a pre 1.10 release though ;-). The guys at Object Craft who maintain Albatross tend to react very positively to bug fixes, feature requests and general suggestions. > The alternative is that its not being used very much. Don't be so cynical ;-). Seriously, I had quite a good look around before deciding on Albatross. Albatross has got some really nice, powerful features and it's so simple to use (it took me about 30 minutes to write my first Albatross application). Albatross does a fair amount for you without getting in the way. Have a play, use the documentation and the wiki and please ask here if you have any specific questions. Cheers, Matt -- Matt Goodall, Pollenation Internet Ltd w: http://www.pollenation.net e: matt at pollenation.net