[mod_python] Mapping a URI to pages dynamically.

PhilipJägenstedt philipj at telia.com
Fri May 16 23:18:19 EST 2003


Hello.

My subject is bad, because I can't figure out what to call what I want
to do.

I'm writing a wiki-ish application, where currently I'm writing URIs
like http://site.org/?page=cow&group=animals. I don't much like this
approach, and would like to instead have an URI like
http://site.org/animals/cow, which would give the same result. The ideal
thing would be if I could get mod_python to handle _all_ requests, for
any type of file (not just .py) in a directory, so that I could just
read req.uri and manually figure out what to do -- if the given group or
page doesn't exist, return 404 or something.

So, how could I achieve something like this with mod_python? The key
issue is getting mod_python to handle everything really, but if that's
not a good way to go about the problem, please tell what else I could
do. I've heard so much talk about twisted and zope, which I think might
do something like this, but both of those libraries/frameworks appear to
be so much more than I need -- I want to continue using mod_python.

Ideas?

// Philip Jägenstedt


More information about the Mod_python mailing list