Got it. Thanks!

On Thursday, November 13, 2014 2:07:08 PM UTC-5, Leonel Câmara wrote:
>
> Because when you don't specify, the URL function uses the extension of the 
> current request. More specifically URL does this:
>
> if extension is None and r.extension != 'html':
>             extension = r.extension
>
>
> Extension is None by default if you don't specify. However later URL also 
> does this:
>
>         if '.' in function:
>             function, extension = function.rsplit('.', 1)
>
>
> So another way to declare the extension you want (instead of passing it to 
> URL with extension=) is to just put it in your function name, which is what 
> you did.
>

-- 
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/d/optout.

Reply via email to