[Web-SIG] Standardized template API
ianb at colorstudy.com
Wed Feb 1 05:32:01 CET 2006
Phillip J. Eby wrote:
> [back to the Web-SIG]
> At 09:39 PM 1/31/2006 -0600, Ian Bicking wrote:
>> How do you pass in variables?
> environ, or a nested variable therein
OK, if you invert that (put the environ in the variables) then you
get... variables, like in the original spec.
>> How do you get non-string output?
> What kind of non-string output? For doing what?
Like ElementTree output, that you might pipe through other
> >But there's a kind of templating that occurs in a typical application
> >that is much more intimately tied to the calling code, and shouldn't be
> >pushed through an HTTP-like interface.
> But that HTTP-like interface can be concealed in a library wrapper for
> systems that don't orient that way, and if you *don't* supply such an
> interface, then template systems that orient that way are put at a
> disadvantage that *can't* be worked around by library wrapping.
I just don't get it... why do I care about the status or headers from
the template? I don't want the template returning those things. I
probably want the template returning a unicode string. Providing a
content-type would be fine, but hardly important.
So, I want to send variables in, and I want to get a string out... and
that's what the original spec does. Why phrase it in terms of WSGI?
Ian Bicking | ianb at colorstudy.com | http://blog.ianbicking.org
More information about the Web-SIG