[albatross-users] Login, authentication, and sessions: Popview application problems

Matt Goodall matt at pollenation.net
Mon Oct 27 01:27:42 EST 2003


Michael Hartl wrote:

>I'm trying to learn how to use Albatross to do login,
>authentication, and sessions.  The documentation says
>that this is possible, but I can't figure out how to
>do it.  
>
>The Popview example is a case in point. If I begin at
>popview1/popview.py, I am immediately confronted with
>username/password fields, but I can't find the
>appropriate login information anywhere in the
>Albatross manual.
>
That's because the popview examples authenticate aginst a POP3 server, 
it has nothing to do with Albatross itself.

Each of the popview examples contains a popviewlib module. You need to 
change the pophost variable at the top to your pop3 server and log in 
using your normal username/password. If that's not documented in the 
manual then it probably should be.

On yeah, for some reason login.html restricts the length of username and 
password to 10 characters which was too small for me but may be fine for 
you. Just edit login.html if necessary.

>Furthermore, if I type in a random
>guess, the result is an exception (reproduced after
>this message). 
>
Yep, that exception says that the exception happened inside Python 2.2's 
standard poplib module. If you look back up the stack (i.e. starting at 
the bottom) the first bit of Albatross/popview code you see is line 67 
of popviewlib.py which tries to open the connection to the POP3 server. 
Admittedly, it's not that easy to decode but tracebacks never really 
are. They do generally contain a wealth of information about where to 
start looking though.

>I've had no luck with any of the
>popview2-4 either.  The examples at, say,
>http://www.object-craft.com.au/cgi-bin/alsamp/popview4/popview.py
>also don't work; entering a username/password pair and
>submitting the login form appears to do nothing.
>  
>
This is all the same problem as above.

>I should note that the errors I'm finding seem to be
>the same whether the Albatross application server is
>running or not.  Also, in case it's relevant, I'm
>running Apache 2.0.47 and Python 2.2 on Red Hat Linux
>9.0.  The errors appear using both Albatross 1.10 and
>1.11pre2.
>
>I'm in the alpha stage of building a commercial
>website, and I'm trying to use Python in preference to
>PHP, but functional and well-documented support for
>Python web programming (especially
>login/authentication and session management) is
>scarce.  Please tell me Albatross is the answer I've
>been looking for!
>  
>
Python is a fantastic choice for web development, I strongly recommend 
it. Whether Albatross is a good match for your requirements is a 
different matter. If you post some more details about what you are 
trying to achieve there are various people on the list who may be able 
to offer some advice.

Cheers, Matt

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





More information about the Albatross-users mailing list