> Hi,
> I have a question:
>
> For example, somebody opens this page:
> .../profile/1
>
> Now, in the def profile(): there shall be a variable:
>
> a=1
>
> Or, when this page gets opened:
> .../profile/12345
>
> I wish this variable:
> a=12345
>
This is discussed in detail in the web2py book:

http://www.web2py.com/books/default/chapter/29/04/the-core#Dispatching

Just an example:

if the url has this form

<base address>/<app>/<controller>/<action>/<value 0>/<value 1>/.../<value n>

Your action logic (i.e. a function defined at the controller file) could 
retrieve it this way:

value_1 = request.args(0)
...
value_n = request.args(n)


-- 
Resources:
- http://web2py.com
- http://web2py.com/book (Documentation)
- http://github.com/web2py/web2py (Source code)
- https://code.google.com/p/web2py/issues/list (Report Issues)
--- 
You received this message because you are subscribed to the Google Groups 
"web2py-users" group.
To unsubscribe from this group and stop receiving emails from it, send an email 
to web2py+unsubscr...@googlegroups.com.
For more options, visit https://groups.google.com/groups/opt_out.

Reply via email to