summaryrefslogtreecommitdiff
path: root/src/mailman/model/docs
diff options
context:
space:
mode:
authorBarry Warsaw2012-01-30 10:37:16 -0500
committerBarry Warsaw2012-01-30 10:37:16 -0500
commitdf6ec9f2960f1de89acc17ec28c3fe170a32e1dd (patch)
treec212f56d3cb6510362b9f21c8dd625aec450bdd7 /src/mailman/model/docs
parent78b9ea398e6671d94f958e625b640383f1d43a75 (diff)
downloadmailman-df6ec9f2960f1de89acc17ec28c3fe170a32e1dd.tar.gz
mailman-df6ec9f2960f1de89acc17ec28c3fe170a32e1dd.tar.zst
mailman-df6ec9f2960f1de89acc17ec28c3fe170a32e1dd.zip
* Held messages can now be moderated through the REST API. Mailing list
resources now accept a `held` path component. GETing this returns all held messages for the mailing list. POSTing to a specific request id under this url can dispose of the message using `Action` enums. * `IRequests` interface is removed. Now just use adaptation from `IListRequests` directly (which takes an `IMailingList` object). * `handle_message()` now allows for `Action.hold` which is synonymous with `Action.defer` (since the message is already being held). * `IListRequests.get_request()` now takes an optional `request_type` argument to narrow the search for the given request. - also, print_function is now a standard __future__ import. The template has been updated, but add this to modules as you edit them.
Diffstat (limited to 'src/mailman/model/docs')
-rw-r--r--src/mailman/model/docs/requests.rst5
1 files changed, 2 insertions, 3 deletions
diff --git a/src/mailman/model/docs/requests.rst b/src/mailman/model/docs/requests.rst
index 1bc66c40a..ab92917cd 100644
--- a/src/mailman/model/docs/requests.rst
+++ b/src/mailman/model/docs/requests.rst
@@ -37,12 +37,11 @@ A set of requests are always related to a particular mailing list, so given a
mailing list you need to get its requests object.
::
- >>> from mailman.interfaces.requests import IListRequests, IRequests
- >>> from zope.component import getUtility
+ >>> from mailman.interfaces.requests import IListRequests
>>> from zope.interface.verify import verifyObject
>>> mlist = create_list('test@example.com')
- >>> requests = getUtility(IRequests).get_list_requests(mlist)
+ >>> requests = IListRequests(mlist)
>>> verifyObject(IListRequests, requests)
True
>>> requests.mailing_list