[mod_python] simpleTAL - 500 Internal Server Error

Erdi Balint erdibalint at freemail.hu
Wed Oct 12 15:09:57 EDT 2005


Hi Graham,

Thank you very much, your very first idea works perfectly for me! (I 
haven't tried to get a string from the template yet)

Balint

Graham Dumpleton wrote:
> If sys.stdout is where TAL is writing the output to, try instead:
> 
>   req.content_type = 'text/html'
>   req.send_http_header()
>   template.expand (context, req)
>   return " "
> 
> This will only work though if TAL only uses write() on sys.stdout.
> 
> It would be better if you could get a string out of expand()
> and write it to req explicitly or return it from handler.
> 


More information about the Mod_python mailing list