zope.app.wsgi adapters not registered by default
Bug #782040 reported by
Jeroen Michiel
This bug affects 1 person
Affects | Status | Importance | Assigned to | Milestone | |
---|---|---|---|---|---|
grok |
Fix Released
|
Undecided
|
Unassigned |
Bug Description
If you try to return a tempfile for delivering a download to a client, like this:
from tempfile import TemporaryFile
class Download(
def render(self):
tempfile = TemporaryFile()
return tempfile
you will get the error 'TypeError: The result should be None, a string, or adaptable to IResult.' accessing the view.
zope.app.wsgi does provide adapters for this purpose, but they aren't registered by default.
Adding 'zope.app.wsgi' to install_requires in setup.py solves the issue.
To post a comment you must log in.
Fixed in the grok package version 1.7