[mod_python] PublisherHandler

Mike Klein mikeklein at sbcglobal.net
Thu Oct 2 13:08:10 EST 2003


Gregory (Grisha) Trubetskoy wrote:

>On Thu, 2 Oct 2003, Mike Klein wrote:
>
>  
>
>>Shouldn't he just remove the SetHandler line?
>>    
>>
>
>That would do it too, but I'm guessing he specifically neede SetHandler.
>
>This would allow to use SetHandler-style URL's, such as
>http://myhost.com/guestbook/adduser, (as opposed to
>http://myhost.com/guestbook.py/adduser), and at the same time be able to
>server other files, e.g. http://myhost.com/images/blah.gif
>
>Grisha
>
>  
>
Caveat: I am a python 101 user...

My first mistake was assuming a php/jsp/shtml model for delivering 
pages. It took me a few tweaks to getting things in python similar to 
this model...where I can littler python files willy-nilly. I didn't see 
enough of his httpsd.conf file to understand what he wanted to do.

I just know his mistake 'smelled' similar to the first mistake I 
made...using SetHandler and then not being able to access anything else 
on my site!

For laughs...this is what I have (at a root/top level) in my httpsd.conf 
for Apache to deliver python pages from anywhere under my docroot:
------------------------
#
# Stuff for mod_python
#
AddHandler python-program .py
PythonHandler mod_python.publisher
PythonDebug On
------------------------

Other than having to specify functions within my py files (this is 
ok...standard), it gives me the 'document' under docroot model that I 
was looking for...

cheers,

mike
-------------- next part --------------
An HTML attachment was scrubbed...
URL: http://mailman.modpython.org/pipermail/mod_python/attachments/20031002/e07a9a26/attachment-0003.htm


More information about the Mod_python mailing list