On Sat, Sep 19, 2009 at 1:46 PM, szimszon <szims...@gmail.com> wrote:

>
> Hi All!
>
> I wonder if somebody could help me.
>
> I have:
>
> form=crud.create(db.oklevel_sablon,next=URL
> (r=request,f='sablonsor_jog',args="[id]"))
>
> But the next url looks:
> .../sablonsor_jog/%5Bid%5D
>
> The "[id]" isn't replaced with the created record's number :(
>

I think you misread this:   it says:

"""
* next is the URL to redirect to after success.  If the URL [NOTE: NOT the
CALL to the helper function URL(), but the string of the target URL
itself!]  contains the substring "[id]" this will be replaced by the id of
the record currently created/updated
"""

Is this enough of a hint, or do you need an example?
(Suggestion:  put the output from the URL() call in a variable, don't
specify "args" in the URL() call, rather catenate "[id]" to what URL() gives
you)


> I read in the book page 217:
>
> "• 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."
>
> >
>

--~--~---------~--~----~------------~-------~--~----~
You received this message because you are subscribed to the Google Groups 
"web2py-users" group.
To post to this group, send email to web2py@googlegroups.com
To unsubscribe from this group, send email to 
web2py+unsubscr...@googlegroups.com
For more options, visit this group at 
http://groups.google.com/group/web2py?hl=en
-~----------~----~----~----~------~----~------~--~---

Reply via email to