Just tagging up in case I have to search for this again later:

On Wednesday, January 21, 2015 at 4:38:04 PM UTC-8, Dave S wrote:
>
>
>
> 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'".
>
>
In the earlier message, I also said

> > I may have to pay attention to that if I split it out into a second 
controller file, which I probably should do because I've now got 
> > the site serving 3 different types of actions (only loosely related). 

Done, and so far I've only had to specify the new controller in the view 
that does the LOAD().  I've also copied that view to 
views/newctlr/index.html, so it works for me in the short form, as well.  
Happy am I, on 2 different linux systems but using Rocket on both of them 
(development system and alternate development system).

/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