On 17/07/07, Florent Aide <[EMAIL PROTECTED]> wrote:
>
> Hi Rangi,
>
> You should set values to '' in the exception handler like this:
>
>             except:
>                 values = ''
>                 flash = "Not valid edit"
>
> obviously you have an exception because your user id is false and not
> found so since you return a value you should set it to something...

Hey Florent,

That exception doesn't get called because it's inside the "edit" if
statement, and we're at this stage under "save". But you did put me on
the right track. By simply initializing "values" and "submit_action"
at the beginning of the method I got this to behave as I'd like.
Thankyou. The widget obviously holds the values from before the
redirect.

I still don't fully understand what's happening though, and how come
the Bookmark code works.

When my "form" method gets called as error_handler then args[0] is the
id, not "edit", "new" or even "save". When it gets called usually
args[0] is the action and arg[1] is the id.

If that were the case in the bookmarker code
http://paste.turbogears.org/paste/1494 then shouldn't it have the same
problem of values never being initialised? Strange.

Oh well, thanks for your help! I'll work it out. I'm new to web apps,
so I'm having to work out new ways in which to debug!

Cheers,
r.


>
> Florent.
>
> On 7/16/07, Rangi Sutton <[EMAIL PROTECTED]> wrote:
> >
> > Hi guys,
> >
> > Perhaps someone could help me past this small enigma. I'm attempting
>
> >
>


-- 
Rangi Sutton                             Kanuka Studio Pty Ltd
[EMAIL PROTECTED]               http://www.kanuka.com.au/
Studio +61 (0)7 3139 1040         35 Dover St. Albion
Mobile +61 (0)4 1521 1280         QLD 4010 Australia

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