diff options
| author | Barry Warsaw | 2007-06-10 19:14:10 -0400 |
|---|---|---|
| committer | Barry Warsaw | 2007-06-10 19:14:10 -0400 |
| commit | 2551bc7cac27c268bbfb05b735e223cad02d5c27 (patch) | |
| tree | 2384ff5290ad9dde90d47b30a2f134905b913253 /Mailman/database/model/mailinglist.py | |
| parent | 5bc4941f0b749830d5e4feb57be5f172e77e0631 (diff) | |
| download | mailman-2551bc7cac27c268bbfb05b735e223cad02d5c27.tar.gz mailman-2551bc7cac27c268bbfb05b735e223cad02d5c27.tar.zst mailman-2551bc7cac27c268bbfb05b735e223cad02d5c27.zip | |
More test updates based on simplified data model. Rosters are gone so the
mlist-rosters.txt tests are removed.
Give MailingList entities a Preferences foreign key, so that they now have
preferences.
Member.preferences(): Watch out for unlinked addresses, i.e. which have no
user and thus no user preferences.
Address.controls() takes a text email address, not an IAddress.
UserManager: add create_address(), delete_address(), get_address(), and
'addresses' property.
Updated the address.txt and user.txt doctests as needed.
Added User.register() to register an email address and immediately link it to
a user.
Diffstat (limited to 'Mailman/database/model/mailinglist.py')
| -rw-r--r-- | Mailman/database/model/mailinglist.py | 3 |
1 files changed, 3 insertions, 0 deletions
diff --git a/Mailman/database/model/mailinglist.py b/Mailman/database/model/mailinglist.py index edd2eab0d..1e7823911 100644 --- a/Mailman/database/model/mailinglist.py +++ b/Mailman/database/model/mailinglist.py @@ -22,6 +22,8 @@ from Mailman.Utils import fqdn_listname, split_listname from Mailman.configuration import config from Mailman.interfaces import * +PREFERENCE_KIND = 'Mailman.database.model.profile.Preferences' + class MailingList(Entity): @@ -154,6 +156,7 @@ class MailingList(Entity): has_field('unsubscribe_policy', Integer), has_field('welcome_msg', Unicode), # Relationships + belongs_to('preferences', of_kind=PREFERENCE_KIND) ## has_and_belongs_to_many( ## 'available_languages', ## of_kind='Mailman.database.model.languages.Language') |
