[mod_python] Modifying publisher for sensible URLs

Peter Bittner peter.bittner at gmx.net
Fri Sep 6 14:22:25 EST 2002


Hi!

I am happy there was some feedback about my modifications to the publisher
(although I know they are everything but brilliant! :-) ).

Could we discuss whether it were worth to change the publisher module so
that it offers some more flexibility as far as URLs are concerned? I'm afraid I
just don't know enough about the publisher to do some more serious
modifications. However, I've found some problems related to this issue:

1. "http://servername/path/script/" works, but
"http://servername/path/script" (without the trailing slash) doesn't. (I can imagine why, but don't know
how to fix it)

2. Provided I've set "index.py" to be one possibility for my
"DirectoryIndex" on Apache then omitting the scriptname in the URL "http://servername/path/"
should execute as "http://servername/path/script". But it seems that it
doesn't (it probably does as ".../script.py" which is not very helpful). (This
would be important to have fixed, too)

(To make this list complete add the following to the top of the list:
"http://servername/path/script/" (or "http://servername/path/script") should
execute as "http://servername/path/script/default". - That is what my
modifications where all about.)

I'd be really happy to see this being implemented in the publisher by
default. I am sure it would do good and would result in a better user acceptance.

Please, Grisha - and all the others that are interested, let's discuss this
out!

Cheers, Peter


> > "Grisha" wrote:
> > > Basically, the publisher doesn't have a "default" method name.
> > > (There is no particular reason for this, it just didn't occur to
> > > me at the time of writing.)
> 
> I have adapted my publisher.py so that is now takes a "default()" method
> by default if no one is specified in the URL. (See the the code below.)
> 
> Do you think this adaption is worth being part of the "official"
> mod_python? Anyone who finds this interesting? (Anyone who
> wouldn't like it?)
>
> [...]

-- 
Peter Bittner
mobil: +43/(0)650/4151545
web: http://www.bittner.at.tf - http://beam.to/htmlkurs
mail: peter.bittner at gmx.net

"Free software is like free speech, not free beer" (Richard Stallman)

GMX - Die Kommunikationsplattform im Internet.
http://www.gmx.net




More information about the Mod_python mailing list