On Dec 7, 2010, at 3:39 PM, Greg wrote:
> 
> I'm playing around with the new autoroutes, but it's not working how
> I'd expect it to. I copied autoroutes.py from the trunk and put it at
> web2py/routes.py . My routes.conf looks like this: 
> http://pastebin.com/Kqz0FvdC
> . I created an app called autoroutes, and only changed lines 17, 19,
> 20 of autoroutes/default.py: http://pastebin.com/XsGEyKet . When I
> visit http://127.0.0.1:8000/index, I see the web2py.com website
> (http://imgur.com/TC5PI.png). When I visit http://127.0.0.1:8000/test
> I see "invalid function". Visiting http://127.0.0.1:8000/admin/default/site
> works fine.
> 
> Does anyone have any idea what's going on here? Why am I not seeing my
> local web2py server?
> 
> Thanks for any help.

The latest scripts/autoroutes.py defaults to using the config string in the 
file (see line 35) if it's not empty (in preference to routes.conf).

That defaults to the example app:

config = '''
127.0.0.1   /examples/default
domain1.com /app1/default
domain2.com /app2/default
domain3.com /app3/defcon3
'''

...which looks like the web2py site.

So either put your config in that string, or make that string empty, and it'll 
use route.conf.

(Note: the reason that the config string isn't empty is that it drives the 
doctest.)

Reply via email to