Re: [web2py] Re: How may I do that

2010-06-30 Thread Jean-Guy
I had to figure (remember my read) out how to call the id in my other function, but I got it to work. Here is my working functions : def atable_create(): if auth.has_membership(auth.id_group('group1')): form=crud.create(db.atable,next='atable_read/[id]',message=T('form accepted'))

[web2py] Re: How may I do that

2010-06-30 Thread Chris S
>From the book: "next is the URL to redirect to after success. If the URL contains the substring "[id]" this will be replaced by the id of the record currently created/updated." While I haven't used that specifically I would say: form=crud.create(db.atable,next=URL(r=request,f='atable_read',args=

[web2py] Re: How may I do that

2010-06-30 Thread mdipierro
it is in form.vars.id. You can also use a shotcut: form=crud.create(db.atable,next='atable_read/[id]') On 30 Giu, 15:52, Jean-Guy wrote: > Hello, > > How may I pass the id of my entered record to an other function?? > > def atable_create(): >     if auth.has_membership(auth.id_group('group1')):