On Wednesday, January 21, 2015 at 11:49:52 AM UTC-8, Anthony wrote:
>
> Dave had already responded with:
>
>>
>> Both the function for the page with the button and function the button 
>> loads (that is, stuff()) are in the default.py controller, and the relative 
>> URL is working for me, as long as javascript is enabled [author studies 
>> ceiling for a moment].
>>
>
> If the URL of the containing page is something like 
> http://yourdomain.com/default/parent (i.e., where "parent" is a function 
> in the default.py controller), then the "stuff.load" relative URL would 
> make a request to http://yourdomain.com/default/parent/stuff.load, which 
> presumably would not work. On the other hand, if you have "parent" set as 
> the default function for the default.py controller and the page URL is 
> instead just http://yourdomain.com/default/ (or even just 
> http://yourdomain.com/), then your relative URL will work -- but it will 
> break if you change the default function or include an ambiguous URL arg.
>
>
>
I haven't done anything with  routes.py, and parent != index, so I can't 
explain what I'm doing to make it work.  In yet another function inside 
default.py, I moved all the slow part into a component function (still 
within default.py) and used LOAD() to get the data into place, and for that 
I did have to specify "c='default'".

/dps

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