My Photo

Search


Twitter Updates

    follow me on Twitter

    Interesting Links

    Other Content

    Creative Commons Attribution-NonCommercial 3.0 Unported
    Blog powered by TypePad
    Member since 08/2003

    Become a Fan

    « 17 years | Main | velorution � Al-Careda and Al-Qaeda »

    Sunday, July 24, 2005

    TrackBack

    TrackBack URL for this entry:
    http://www.typepad.com/services/trackback/6a00d8345296c369e200d8345bedc869e2

    Listed below are links to weblogs that reference Composing WSGI Apps:

    » Leonardo progress from 42
    I have written about Leonardo before, but now I am implementing a site using it for real. [Read More]

    Comments

    Feed You can follow this conversation by subscribing to the comment feed for this post.

    James Tauber

    With you all the way, but I would add that some of the integration you are talking about with AJAX, I was thinking could be server-side as well. i.e. some providers could get their information from sources other that LFS, like other atom feeds or databases.

    Ian Bicking

    Paste's recursive middleware would help here: http://svn.pythonpaste.org/Paste/trunk/paste/recursive.py

    You would do something like:

    includer = environ['paste.recursive.include']
    response = includer('/path/to/other/app')
    response_body = str(response)

    This will make a simulated (or internal) request to that path (relative to the SCRIPT_NAME of wherever the recursive middleware is installed). It's a lot like Apache SSI's, where you can include a "virtual" path, which does an internal request and returns the body of the response.

    One easy way to make that available would just be to put the includer object into the namespace for the template, and then your template can do a recursive call.

    Also, while WSGI-level caching isn't very granular, this could be granular. That is, you could cache internal requests that make up the body of a page, and save on some work. There isn't any caching middleware for Paste yet, but that's definitely something I'd like to see happen at some point.

    The comments to this entry are closed.