If I get an error while validation, I set the session variables:
except formencode.Invalid, error:
session['flash_error'] = str(error) session['htmlfill_values'] =
self.form_result
return self.show_form()
and then in show_form:
values = session.pop('htmlfill_values', None)
if not values:
// Fill values with defaults to show the form
return htmlfill.render(render('/derived/profile/edit_user.html'), values)
Definitely not the cleanest way to do things.. but works.
DD.
On Fri, Oct 23, 2009 at 1:18 PM, Jonathan Vanasco <[email protected]>wrote:
>
> On Oct 23, 3:55 pm, d2ncal <[email protected]> wrote:
> > I am looking for the same thing.
> >
> > Currently, I am setting session['flash_error'] and calling my
> > show_form function which does htmlfill. but there has to have a better
> > way.
>
> How does your show_form function handle htmlfill ?
> >
>
--~--~---------~--~----~------------~-------~--~----~
You received this message because you are subscribed to the Google Groups
"pylons-discuss" 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/pylons-discuss?hl=en
-~----------~----~----~----~------~----~------~--~---