Simon Willison’s Weblog

Subscribe

1 item tagged “httpresponse”

2007

If you only remember one thing about handling non-HTML output via Django: know that you can use the HttpResponse object as if it were a file. Writing to such an object and returning it will give you the output you wrote. It’s a very simple concept, but one that translates well to third-party libraries.

Alex de Landgraaf # 3rd December 2007, 8:44 pm