Skip to content

Commit 4e4266a

Browse files
committed
Add an HTTPRequest at app.REQUEST before calling setRequest(app.REQUEST)
1 parent 8d232c1 commit 4e4266a

File tree

1 file changed

+3
-0
lines changed

1 file changed

+3
-0
lines changed

docs/admin-guide/run-plone.md

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -107,6 +107,9 @@ For any of these commands, press {kbd}`ctrl-d` to stop the process.
107107
To make sure that the request is fully set up for any code that uses `zope.globalrequest.getRequest`, you might need to use the following code.
108108

109109
```python
110+
from Testing.makerequest import makerequest
110111
from zope.globalrequest import setRequest
112+
113+
app = makerequest(app)
111114
setRequest(app.REQUEST)
112115
```

0 commit comments

Comments
 (0)