Aaaron,
This is such a simple and cool function! thanks for sharing it!
Jose

On 10/3/07, aaaron <[EMAIL PROTECTED]> wrote:
>
>
> I override render_response() (now called render() in pylons 0.9.6 i
> think) so any action can pass in default form values and htmlfill will
> populate the form accordingly. This way you don't need to rely on a
> form_result.
>
> in my_proj.lib.base.py:
>
> def render_response(*args, **kw):
>
>     form_defaults = kw.pop('form_defaults', False)
>     if form_defaults:
>         content = render(*args, **kw)
>         content = htmlfill.render(content, defaults=form_defaults)
>         return content
>     return render(*args, **kw)
>
> usage:
>
> h.render_response('/template', form_defaults=my_dict)
>
> -aaaron
>
> On Oct 1, 7:17 pm, voltron <[EMAIL PROTECTED]> wrote:
> > I have a form that I use to capture and display user data, I would
> > like the user to submit the form, a controller saves the data and re-
> > render the filled in data in the same form,  so I just redirect the
> > form to itself, strangely this does not work, is this the wrong way to
> > do this?
> >
> > Thanks
>
>
> >
>

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

Reply via email to