def reporte():
form=FORM(TABLE(
TR("Tirador",SELECT(_type="select",_name="usuario",
*[OPTION(x.apellidopaterno,' ',x.apellidomaterno,'
',x.nombre,_value=x.id)
for x in db().select(db.usuario.ALL, orderby =
db.usuario.apellidopaterno)])),
TR("", INPUT(_type='submit',_value='Reporte'))
))
if form.accepts(request.vars, session):
return reporte01(form.vars.usuario)
------>
#here i want to redirect the funtion or update.
------>
return dict(form=form)
Sorry the another post were incomplete and not make myself understood,
apologies, the post was a mistake.
Here is the function, so after donwload the pdf, i want to update my
form. Thank you very much
On Sep 9, 3:42 pm, mdipierro <[email protected]> wrote:
> Please explain more. I do not understand.
>
> On Sep 9, 3:36 pm, __Kyo__ <[email protected]> wrote:
>
>
>
> > A form created, is configured to download a pdf (return), but when I
> > resume using the form, it needs to be updated (redirect), maybe
> > there's another way to do this, download and update the form... thanks
> > in advance.
>
> > On Sep 9, 3:06 pm, mdipierro <[email protected]> wrote:
>
> > > I do not understand. You can do this:
>
> > > if success:
> > > return dict()
> > > else:
> > > redirect(somewhere)
>
> > > but you cannot do both at the same time.
>
> > > technically redirect raises HTTP(303) while return raises HTTP(200).
>
> > > massimo
>
> > > On Sep 9, 3:03 pm, __Kyo__ <[email protected]> wrote:
>
> > > > Is there any way to include return and redirect at same time, in one
> > > > function?
--~--~---------~--~----~------------~-------~--~----~
You received this message because you are subscribed to the Google Groups
"web2py-users" 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/web2py?hl=en
-~----------~----~----~----~------~----~------~--~---