You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
{{ message }}
This repository has been archived by the owner on Nov 30, 2023. It is now read-only.
With webapp, I can write out a form using self.response.out.write( form )
I can't with webapp-improved
self.response.out.write(StateForm())
File "/home/jamesd/python/google_appengine/lib/webob/webob/__init__.py", line 1613, in write
self.body += text
TypeError: cannot concatenate 'str' and 'StateForm' objects
Original issue reported on code.google.com by JDeibele on 13 Aug 2010 at 6:12
The text was updated successfully, but these errors were encountered:
Hi,
Thanks for the report. For now you can add this method to Response:
def write(self, text):
"""Appends a text to the response body."""
# webapp uses StringIO as Response.out, so we need to convert anything
# that is not str or unicode to string to keep same StringIO behavior.
if not isinstance(text, basestring):
text = str(text)
super(Response, self).write(text)
It'll be included in the next release.
Original comment by rodrigo.moraes on 13 Aug 2010 at 8:28
Original issue reported on code.google.com by
JDeibele
on 13 Aug 2010 at 6:12The text was updated successfully, but these errors were encountered: