As I mentioned, I am restarting the server with every change to routes.py. I tried using:
routers = dict( # base router BASE=dict( default_application='myapp', ), ) But this still does not solve my problem. I need *every *page to hide the app name and controller, not just the default index page. Right now I am just trying to get this working in an empty project, so my default controller looks like: def index(): return dict() def contactus(): return dict() and the two corresponding views are just using {{extend 'layout.html'}} and then left empty at the moment. Using this and the above routes.py example, I can go to 127.0.0.1.8000 on my local server and I will see the index page without having to add /myapp/default/index to the url. So it looks like the routes.py is doing something right, however if I try 127.0.0.1:8000/contactus I get an invalid request. Using 127.0.0.1:8000/myapp/default/contactus works fine, but I don't want the app and controller in the url. Hope my explanation of the problem is clear. Thanks On Friday, March 1, 2013 10:51:29 AM UTC-5, Jonathan Lundell wrote: > > On 1 Mar 2013, at 6:42 AM, jjg0 <miahg...@gmail.com <javascript:>> wrote: > > I saw in another question someone posted an example using the parameter > based system: > > > routers = dict( > > # base router > BASE=dict( > default_application='myapp', > ), > > myapp=dict( > default_controller='default', > default_function='index', > functions=['index', 'contactus'], > ), > ) > > where I guess you have to type in every function in the default > controller? > > > Only if you want to omit function names at the same time you have args > following the function. Otherwise, no need. To accomplish what you're > after, all you need (because default/index is already the deafult) is: > > routers = dict( > > # base router > BASE=dict( > default_application='myapp', > ), > ) > > This still doesn't solve my problem. Using these settings does the same > thing where going to 127.0.0.1:8000 will take you to > 127.0.0.1:8000/myapp/default/index, but trying any other page like > 127.0.0.1:8000/contactus does not work. > > > It should. Be sure to restart your server/web2py after editing routes.py, > though. > > I still need to use 127.0.0.1:8000/myapp/default/<function> for any > additional pages I add. > > > > -- --- 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.