For example:
# this works:
def create_image():
...
if form.accepts(request.vars, session,
onvalidation = assign_estate_id(form)):
# this does not work until the "delete_image" method redirects to the
"create_image" method:
if form.accepts(request.vars, session,
onvalidation = assign_estate_id):
def delete_image():
if db(db.image.id==request.args(0)).delete():
session.flash = T('The image was successfully deleted.')
redirect(URL(r=request, f='create_image'))
I know that this is not the case with relational databases, but I am
using GAE for this application.
On Sep 16, 4:05 pm, mdipierro <[email protected]> wrote:
> Can you show an example of what you mean? I do not think what you say
> is the case.
>
> On Sep 16, 5:22 am, Vidul Petrov <[email protected]> wrote:
>
>
>
> > Hi all,
>
> > There is a problem with "onvalidation" - it works only after redirect
> > unless the form object is explicitly given:
>
> > onvalidation = assign_some_value_to_a_var(form)
>
> > Is this a bug or the new behavior of "onvalidation"?
--~--~---------~--~----~------------~-------~--~----~
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
-~----------~----~----~----~------~----~------~--~---