[albatross-users] URL style user inputs requiring a session server

Andrew McNamara andrewm at object-craft.com.au
Wed Mar 19 12:19:03 EST 2003


>1. I copied the file session-server/simpleserver.py 
>into the popview3 directory, ran it and then entered
>   http://localhost:34343/popview.py
>into my browser.  This doesn't work - what are the 
>correct instructions for running the popview3 example?

The session server is a helper for the cgi, rather than being something
users access directly (the albatross application still runs under your
web server). You the session server with something like:

    al-session-daemon -l /tmp/al-ses.log -k /tmp/al-ses.pid start

You can also give it a -h option, and it will show you other arguments
that it accepts.

Once it is running, you should be able to use session-server based
albatross applications. Assuming that you had installed the popview3 sample
to your web server's cgi-bin directory, you would access it as:

    http://localhost/cgi-bin/popview3/popview.py

>2. It seems that in order to have an albatross app be 
>responsive to URL style user inputs, like popview3, 
>e.g. <a href="magic?nextpage,m=1">Next Page</a> then 
>one needs to run an albatross session server.  Doesn't
>this mean that I cannot deploy on my regular obscure 
>overseas ISP since they won't let me run my own server, 
>let alone have my own port?

You may find the session-file mixin more suitable in this case - it uses
files (by default in /tmp/<appname>) to record the session, rather than
passing the session to the session server.

>3. Is there any documentation or quick overview of 
>what each part of URL style user inputs, mean to 
>albatross? e.g.
> e.g. <a href="magic?nextpage,m=1">Next Page</a>
>What exact bit of my web app code is executed when a user 
>clicks on such an url?  How do I get at the url parameters
>or does albatross make them available for me in some way?

This is a special signal to the al-for iterator called "m", and isn't
passed directly to your application. Normally the al-for statement
iterates over all elements of the supplied list, but if you specify
the pagesize attribute, it will render the supplied list the specified
number of elements at a time, and the nextpage/prevpage stuff is used
to give the user control over which pagesized chunk of the list will be
rendered.

>If I had popview3 running I could probably deconstruct it
>and figure out my question #3, however some simple 
>documentation on this would be good. The doco on <al-a> tags
>is great on creating these sorts of tags, but not on what
>they mean.

Hope this helps.

-- 
Andrew McNamara, Senior Developer, Object Craft
http://www.object-craft.com.au/



More information about the Albatross-users mailing list