[mod_python] Default function for Publisher

Gregory (Grisha) Trubetskoy grisha at modpython.org
Sun Nov 10 14:30:19 EST 2002


in MP 3.0 it defaults "index"

Grisha

On Sun, 10 Nov 2002, Arcady Genkin wrote:

> I spent a few hours trying to figure out how to make the url
> "http://foo" respond with a python handler in index.py.  In the end I
> came up with the following:
>
>    RewriteEngine on
>    RewriteRule ^/*$ /index.py/main
>
> which seems to work, but is a hack.  In the list archives I saw a few
> threads that proposed introducing a default handler function for the
> Publisher, but the impression I got was that the functionality still
> is not implemented.
>
> As a new user of mod_python, I'd like to pitch in that default
> Publisher function would save me a lot of trouble and time, which I'd
> rather have spent getting to know mod_python than learning how
> mod_rewrite works.  It would be much cleaner to write:
>
>   DirectoryIndex index.py
>   PyPublisherDefaultFunction main
>
> or some such.
> --
> Arcady Genkin
>
> guilt is the cause of more disauders
> than history's most obscene marorders                       (E.E. Cummings)
> _______________________________________________
> Mod_python mailing list
> Mod_python at modpython.org
> http://www.modpython.org/mailman/listinfo/mod_python
>




More information about the Mod_python mailing list