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

On Feb 11, 12:47 pm, Lewis <[email protected]> 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 
> aswww.mydomain.com/try.
>
> Do I need to restart web2py?
>
> On Feb 11, 12:34 pm, Lewis <[email protected]> wrote:
>
>
>
>
>
>
>
> > I have followed what both the book and sample files say can be done in
> > routes.py:
>
> > default_application = 'try'
> > default_controller = 'default'
> > default_function = 'index'
>
> > This simply doesn't work.   Enteringwww.mydomain.comasthe target
> > url in the browser routes to the welcome app notwww.mydomain.com/try.
>
> > I believe these need to be put in a dict to work.
>
> > <rant>
> > So, NEVER show them outside of the dict--that approach apparently
> > doesn't work.  You can be sort of high-level and conceptual in the
> > text, but not in code samples.  Code samples actually need to work
> > exactly as provided, else why provide them?
>
> > Please make your examples less fragmentary and contradictory.  It is
> > very important to be complete and clear.  We don't understand every
> > intricacy of web2py and all of the syntactic variations you've chosen
> > to allow (sometimes with important functional differences; sometimes,
> > apparently, just to provide typing shortcuts).  That's why we are
> > relying on all of the information you provide.
>
> > This is a frequent problem in the writing style of the manual (not a
> > language issue--Massimo and many helpers express themselves perfectly
> > in English).   It is hard to write good documentation; but it makes a
> > product much more accessible.
>
> > ...and I quote:
>
> > """
> > ...Explicit is better than implicit.
> > ...Special cases aren't special enough to break the rules.
> > ...There should be one-- and preferably only one --obvious way to do
> > it.
> > """
>
> > </rant>

Reply via email to