[albatross-users] Question using page modules

Andrew McNamara andrewm at object-craft.com.au
Wed Nov 27 16:20:59 EST 2002


>I was under the impression that once you changed the page, you would
>invoke the pageModule you have chosen. ie, I have a choice called
>gicslookup, which is a page module called gicslookup.py.  When I select
>it from the mainpage, the gicslookup form appears just fine (as you'd
>expect).  At this point I have invoked the set_page('gicslookup').
>
>But when I hit the submit button, it re-calls itgaweb.py instead of
>gicslookup.py (which I thought it would do)
>
>The form tag has <form method="post" target="results"
>action="/cgi-bin/protected/itgaweb.py">
>but I thought it should have action="/cgi-bin/protected/itgaweb.py"

The URL will always correspond to the base_url - so you might have
a base_url of 'app.py', and your browser will always be running
/cgi-bin/app.py (unless you are using a RandomPage mixin). In app.py,
you create the App, Request and Context objects, and not much else
(when you call App mixin's __init__ method, you tell it what page is to
be the initial page with the start_page argument).

I suspect you are doing the equivilent of setting the start_page to
app.py - make your initial page module something like "login", and it
will load and run login.py instead (but the URL will still be app.py).

Clear as mud?

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



More information about the Albatross-users mailing list