[mod_python] Aliasing extensions in mod_python

Roger Holness hlnrog001 at gmail.com
Sun Aug 26 16:40:35 EDT 2007


I am working on a python script to generate dynamic wml

I am using publisher of mod_python

The problem I am having is that my script returns valid wml but my
phone that I am testing on (and I assume others as well) doesn't check
the mime type, rather just the extension

ie. www.mywebsite/wml.py/test  is returning valid wml, but the phone
doesn't realise that as it is expecting /test.wml

Now functions names can't contain periods, so I can't do:
def test.wml(req)

I am therefore trying to alias wml.py/test.wml to wml.py/test,
effectively tricking the phone into doing what it should be doing in
the first place

Any ideas how I would go about this?



PS. Yes, I am a noob :P

More information about the Mod_python mailing list