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

Michael Hartl michael_hartl at yahoo.com
Sun Oct 26 16:59:58 EST 2003


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.  Furthermore, if I type in a random
guess, the result is an exception (reproduced after
this message).  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.

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!

Thanks,

Michael


http://localhost/cgi-bin/alsamp/popview1/popview.py
gives

Template traceback (most recent call last):

Traceback (most recent call last):
  File
"/usr/lib/python2.2/site-packages/albatross/app.py",
line 251, in run
    self.process_request(ctx)
  File
"/usr/lib/python2.2/site-packages/albatross/app.py",
line 460, in process_request
    func(ctx)
  File
"/usr/local/apache2/cgi-bin/alsamp/popview1/popview.py",
line 16, in page_process
    ctx.open_mbox()
  File
"/usr/local/apache2/cgi-bin/alsamp/popview1/popview.py",
line 58, in open_mbox
    self.locals.mbox =
popviewlib.Mbox(self.locals.username,
self.locals.passwd)
  File
"/usr/local/apache2/cgi-bin/alsamp/popview1/popviewlib.py",
line 67, in __init__
    self.mbox = poplib.POP3(pophost)
  File "/usr/lib/python2.2/poplib.py", line 80, in
__init__
    for res in socket.getaddrinfo(self.host,
self.port, 0, socket.SOCK_STREAM):
gaierror: (-2, 'Name or service not known')

=====
Michael Hartl
http://www.michaelhartl.com/

__________________________________
Do you Yahoo!?
Exclusive Video Premiere - Britney Spears
http://launch.yahoo.com/promos/britneyspears/



More information about the Albatross-users mailing list