On Sun, Jan 11, 2009 at 11:50 AM, SM <[email protected]> wrote:
>
> Suppose I have a form template like follows:
>
> $def with (errormsg)
change this line to
$def with (errormsg=None)
>
>
> <some html ... >
>
> $if errormsg:
> $errormsg
>
> <more html ...>
>
>
>
> I'd like to use it with code like this:
>
> class do_form:
> def GET(self):
> return render.formtemplate()
> def POST(self):
> return render.formtemplate("there was an error")
>
>
> Of course, this doesn't work because the template is expecting one
> variable and the render call in the GET passes zero args.
>
> How do you handle the case where there is a variable number of
> variables to pass to the template?
> >
>
--
ashok raavi
--~--~---------~--~----~------------~-------~--~----~
You received this message because you are subscribed to the Google Groups
"web.py" 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/webpy?hl=en
-~----------~----~----~----~------~----~------~--~---