[Twisted-web] guarded example using external login form file
psanchez at nortel.com
Wed Apr 27 12:50:36 MDT 2005
I'm learning nevow and I would appreciate some help modifying this
This "logs in" a user validating it with a username and password. The
form used to accept user input is embedded in the code using the stan
tags in the NotLoggedIn() class. What I want is to have the login form
in an external xhtml file (login.html), like the one that follows my
signature. My new NotLoggedIn() class simply looks like this:
"""The resource that is returned when you are not logged in"""
addSlash = True
docFactory = loaders.xmlfile("login.html")
I believe the only thing that has to change in the xhtml file (other
than the nevow xml space declaration) is on the first line, the "action"
thing (guard.LOGIN_AVATAR in guarded.py). But I can't figure out what
nevow tag to use there.
Can you suggest how to do it?
<form action="guard.LOGIN_AVATAR" method="post">
<td><input type="text" name="username" /></td>
<td><input type="password" name="password" /></td>
<input type="submit" />
More information about the Twisted-web