I'm not quite sure what the deal is with that. I think one of the two files is 
from the old routers file and just never got cleaned up.

On Mar 22, 2011, at 2:27 PM, Keith Pettit wrote:

> That worked.  Thank you for the help.  
> 
> Just a note, in my default install of web2py there was a 
> router.example.py -AND-
> routes.example.py
> 
> In the examples there router.example.py had exactly what you suggested so I 
> tried that and renamed it to router.py which didn't work.  I created a new 
> file like you suggested called routes.py which did work.  It's kind of 
> confusing with the two examples that don't quite work so I thought I'd 
> mention it.
> 
> Thanks for the help,
> 
> -Keith
> 
> On Tue, Mar 22, 2011 at 1:14 PM, Ross Peoples <ross.peop...@gmail.com> wrote:
> I had a similar question as you a few weeks ago. I can tell you that
> the reason why admin doesn't allow you to select a default application
> is because admin would have to edit routes.py, which could break
> everything if not done right and it also requires a server restart, so
> that's why no one has added that functionality.
> 
> Setting the name of your app to 'init' is the easiest way to make it
> default. Although if you want to keep your application's name, you can
> create or modify routes.py in the web2py folder (not your application
> folder) with the following contents:
> 
> routers = dict(
>    BASE = dict(
>        default_application='MyApp',
>    )
> )
> 
> Obviously, you'd want to replace MyApp with your application's name.
> Be sure to restart the web2py server for the changes to take effect.
> You should now be able to go to http://127.0.0.1:8000 which should
> take you to your application's default/index.
> 
> On Mar 22, 6:04 pm, Keith Pettit <keith.pet...@prodesy.com> wrote:
> > I'm fairly new to web2py and had a question early on.  How could I make a
> > app I created in web2py show up by default.  Not that I didn't like the
> > "welcome" app but I wanted to set my own as default.
> >
> > Somebody in IRC #web2py told me to rename my app to "init" which worked.
> >  There wasn't a way I saw in the web admin to do that so I just did it in
> > the commandline.  So based on that experience to make it easier I would
> > suggest the following:
> >
> > 1) In the admin allow users to rename applications
> > 2) in the admin allow users to select a "default" application. I think that
> > would be nicer than renaming a app with a useful name to "init".
> >
> > Thanks for taking the time.
> 
> 
> 
> -- 
> Keith Pettit
> Prodesy Tech Inc.
> keith.pet...@prodesy.com
> 832-200-6153 x2307
> 

Reply via email to