venkatbo wrote:

Hi,

I'm trying to implement a non-identity based login (page)
system and 'am enountering a runtime error. Could someone
look at the implementation and let me know what I'm doing
wrong here with the validators... TG 1.0 on i686 2.4.21.x Linux

The validation includes "PlainText with non-empty" fields
for both username and pwd.  Any valid id/pwd combo
takes the user to the welcome page.

User accesses http://blahblah/, gets a login pg. Gets
the login page with a form. Doesn't enter and username,
password. Clicks "login" once. The validation logic (/login)
kicks in and it return the error-msg dict to be used in the
login.kid template (${XML(message)}). The user clicks "login"
once again, without entering any data... This time I get
a 500 runtime error...

I don't think this is a problem with the validators, more with the
template you're using. Check the source code of the generated page
after you fail to log in for the first time; it seems like your form is
getting duplicated, so the information gets submitted twice. This
doesn't appear to be documented in all the TG docs I've read so far,
but if you end up with 2 form fields of the same name, their values are
added into a list, which means they will fail validation with an error
only indirectly related to what the actual problem is.

--
Ben Sizer


--~--~---------~--~----~------------~-------~--~----~
You received this message because you are subscribed to the Google Groups 
"TurboGears" group.
To post to this group, send email to [email protected]
To unsubscribe from this group, send email to [EMAIL PROTECTED]
For more options, visit this group at 
http://groups.google.com/group/turbogears?hl=en
-~----------~----~----~----~------~----~------~--~---

Reply via email to