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.

Reply via email to