So I've figured out what the problem is.  The submit action to the new
bookmark form is simply "/save_bookmark", which means that args[0] is
no longer "add" (in fact, it is blank).  When there is a problem with
the validation, bookmark gets called again, but this time args[0] is
neither "add" nor "edit" so it goes straight to the last line:
return dict(form=bookmark_form, values=values, action=submit_action)
and, since values was not set earlier, we get the error.

The fix, I have found, is to change the add form submit action to
submit_action= "/save_bookmark/add"

now that args[0] is "add" again, everything is OK, and my forms show up
with their errors highlighted properly.

Hopefully this will help someone else who ends up with the same problem
:-)


--~--~---------~--~----~------------~-------~--~----~
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