@Niphlod -- thanks for your insights. Sorry, I have not enough juice to dig 
deep enough into the web2py_component to see how it's done and then port 
signature into it. But if I did I would definitely submit it as 
web2py_component is about the single most cool thing in all of web2py.

That said, the core question of why self-submit fails after the 
web2py_component() call remains an open mystery to me.

On Thursday, November 28, 2013 3:35:45 AM UTC+8, Niphlod wrote:
>
> if you want to "port" the code that does the signature in python to 
> javascript, feel free to submit it :D
> However, you should pass along the hmac_key, and doing so, you're exposing 
> what you're trying hard to mask.
>
> However, it's kinda of a non-question as per the markup you posted..... if 
> your javascript is embedded in the view, you don't need the javascript to 
> generate the signed url... any code in {{}} gets rendered by python.
>
> Anyhow, if your javascript is not embedded in the view, if needed you can 
> still define a function in your assets that takes the url and then use 
>
> var url = "{{=URL(....., user_signature=True)}}"
> myfunction(url)
>
> bonus points for NOT embedding in static assets absolute urls (that you 
> may need later to be "translated" by a rewrite rule)
>

-- 
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