diff options
| author | Barry Warsaw | 2011-08-30 22:04:14 -0400 |
|---|---|---|
| committer | Barry Warsaw | 2011-08-30 22:04:14 -0400 |
| commit | 232ac1d8af1b6d483a1bd7aa2bc5ae15e0450bdf (patch) | |
| tree | e1e0b843a849bfaccf2d006d9ee1340a99a1eee1 /src/mailman/model/docs | |
| parent | 0664713d4f7e30b0b56b1ce00ccf3367f416c901 (diff) | |
| parent | d1404b057df7f7ce20df7dac13eb18eba4eb02b4 (diff) | |
| download | mailman-232ac1d8af1b6d483a1bd7aa2bc5ae15e0450bdf.tar.gz mailman-232ac1d8af1b6d483a1bd7aa2bc5ae15e0450bdf.tar.zst mailman-232ac1d8af1b6d483a1bd7aa2bc5ae15e0450bdf.zip | |
* New REST resource http://.../<domain>/lists can be GETed in order to find
all the mailing lists in a specific domain (LP: #829765). Given by
Stephen A. Goss.
Diffstat (limited to 'src/mailman/model/docs')
| -rw-r--r-- | src/mailman/model/docs/domains.rst | 24 |
1 files changed, 24 insertions, 0 deletions
diff --git a/src/mailman/model/docs/domains.rst b/src/mailman/model/docs/domains.rst index 4fa39aa2f..878e5835a 100644 --- a/src/mailman/model/docs/domains.rst +++ b/src/mailman/model/docs/domains.rst @@ -71,6 +71,30 @@ Domains can have explicit descriptions and contact addresses. base_url: http://lists.example.net, contact_address: postmaster@example.com> +Domains can list all associated mailing lists with the mailing_lists property. +:: + + >>> def show_lists(domain): + ... mlists = list(domain.mailing_lists) + ... for mlist in mlists: + ... print mlist + ... if len(mlists) == 0: + ... print 'no lists' + + >>> net_domain = manager['example.net'] + >>> com_domain = manager['example.com'] + >>> show_lists(net_domain) + no lists + + >>> create_list('test@example.net') + <mailing list "test@example.net" at ...> + >>> transaction.commit() + >>> show_lists(net_domain) + <mailing list "test@example.net" at ...> + + >>> show_lists(com_domain) + no lists + In the global domain manager, domains are indexed by their email host name. :: |
