The answer appears to be:  yes, you must restart web2py.
That means probably the sample in my first post would also work.

So, a question:
Why do the dictionaries need to be nested?  In other words why is the
key "BASE" necessary?

My rant on the manual still stands.  Sorry to be disagreeable.  Lots
of time wasted on minor syntax discrepancies that could just be made
clearer by ALWAYS unit testing all sample code and code fragments.  We
tend to learn more and more easily by looking at actual code, even
short fragments of code.  This fails if the code fragments don't work
or, as in this case, have a dependency--on restarting the server or
some other dependency--that is not made clear.


Just to be clear:  I really like web2py. It gets a lot of things right
(templates!! and helpers) and includes lots of functionality without
getting in the way. I'm answering more questions on my own.  It just
seems that there are little gotchas that could be easily avoided with
clearer and accurate examples/code samples and perhaps fewer
alternative ways to do the same thing (e.g., indexing the rows object
and writing queries being the best examples).


On Feb 11, 12:50 pm, Jonathan Lundell <[email protected]> wrote:
> On Feb 11, 2012, at 12:47 PM, Lewis wrote:
>
> > This doesn't work either:
>
> > routers = dict(
> >    BASE = dict(
> >        default_application = 'try',
> >    ),
> > )
>
> > I placed the above as routes.py in the web2py folder (of /var as it
> > happens).  All applications run when explicitly referenced as
> >www.mydomain.com/try.
>
> > Do I need to restart web2py?
>
> You need to reload routes.py. Restarting web2py is one way to do that.

Reply via email to