Right now I have a mod_wsgi script that is structured like this.
def application(environ, start_response):
status = '200 OK'
output = 'Hello World!'
response_headers = [('Content-type', 'text/plain'),
('Content-Length', str(len(output)))]
start_response(status, response_headers)
return [output]
I was wondering if anyone knows how to change this to work with the database yieldinstead return, so I can send the page as it is created, and not just after it is completed, so the page loading can go faster for the user.
However, whenever I replace the output for a list and issue it in the application (), it throws an error:
TypeError: sequence of string values expected, value of type list found
source
share