Re: [web2py] Re: Moving away from the "default" controller

2013-01-16 Thread Jonathan Lundell
On 16 Jan 2013, at 5:42 PM, GeeksRule  wrote:
> This is so weird.. I restarted apache & I can now hit the URL..
> This seems resolved now..

Changing routes.py requires restarting the web2py processes, which restarting 
Apache accomplishes. By default, the router's list of controllers is all of 
them, but you need to think of that as a kind of macro that expands to the 
current list of controllers when it first loads. So when you change your 
controllers (add or delete), you're effectively changing the routes file.

> 
> 
> On Wednesday, 16 January 2013 18:24:05 UTC-5, Daniel Gonzalez wrote:
> Have you modified the routes.py file?
> 
> On Wednesday, January 16, 2013 11:39:55 PM UTC+1, GeeksRule wrote:
> I think I'm doing something silly. For the first time now I'm moving away 
> from the "default" controller.
> I've created a new controller called "fromuser.py", there is a single 
> function in it : "def submitAStory():" which returns a form.
> 
> When I hit : http://site.com/myapp/fromuser/submitAStory
> It gives me an error : "invalid function (default/fromuser)"
> 
> I think it is still trying to go into the "default" controller.
> 
> Note : I have created a view called fromuser/submitAStory.html
> 
> Any pointers ?
> 
> 


-- 





[web2py] Re: Moving away from the "default" controller

2013-01-16 Thread GeeksRule
This is so weird.. I restarted apache & I can now hit the URL..
This seems resolved now..


On Wednesday, 16 January 2013 18:24:05 UTC-5, Daniel Gonzalez wrote:
>
> Have you modified the routes.py file?
>
> On Wednesday, January 16, 2013 11:39:55 PM UTC+1, GeeksRule wrote:
>>
>> I think I'm doing something silly. For the first time now I'm moving away 
>> from the "default" controller.
>> I've created a new controller called "fromuser.py", there is a single 
>> function in it : "def submitAStory():" which returns a form.
>>
>> When I hit : http://site.com/myapp/fromuser/submitAStory
>> It gives me an error : "invalid function (default/fromuser)"
>>
>> I think it is still trying to go into the "default" controller.
>>
>> Note : I have created a view called* fromuser/submitAStory.html*
>> *
>> *
>> Any pointers ?*
>> *
>>
>

-- 





[web2py] Re: Moving away from the "default" controller

2013-01-16 Thread GeeksRule
Yes.

#!/usr/bin/python
routers = dict(
BASE = dict(
default_application='myapp',
)
)


On Wednesday, 16 January 2013 18:24:05 UTC-5, Daniel Gonzalez wrote:
>
> Have you modified the routes.py file?
>
> On Wednesday, January 16, 2013 11:39:55 PM UTC+1, GeeksRule wrote:
>>
>> I think I'm doing something silly. For the first time now I'm moving away 
>> from the "default" controller.
>> I've created a new controller called "fromuser.py", there is a single 
>> function in it : "def submitAStory():" which returns a form.
>>
>> When I hit : http://site.com/myapp/fromuser/submitAStory
>> It gives me an error : "invalid function (default/fromuser)"
>>
>> I think it is still trying to go into the "default" controller.
>>
>> Note : I have created a view called* fromuser/submitAStory.html*
>> *
>> *
>> Any pointers ?*
>> *
>>
>

-- 





[web2py] Re: Moving away from the "default" controller

2013-01-16 Thread Daniel Gonzalez
Have you modified the routes.py file?

On Wednesday, January 16, 2013 11:39:55 PM UTC+1, GeeksRule wrote:
>
> I think I'm doing something silly. For the first time now I'm moving away 
> from the "default" controller.
> I've created a new controller called "fromuser.py", there is a single 
> function in it : "def submitAStory():" which returns a form.
>
> When I hit : http://site.com/myapp/fromuser/submitAStory
> It gives me an error : "invalid function (default/fromuser)"
>
> I think it is still trying to go into the "default" controller.
>
> Note : I have created a view called* fromuser/submitAStory.html*
> *
> *
> Any pointers ?*
> *
>

--