~barry/mailman/events-and-web

« back to all changes in this revision

Viewing changes to src/mailman/model/digests.py

  • Committer: Barry Warsaw
  • Date: 2011-09-23 23:47:19 UTC
  • Revision ID: barry@list.org-20110923234719-fp31k6ch59oh3cvf
Improved the way flufl.enum.Enums are stored in the database.  Now, they
should always be stored as INTEGER columns, with the enum class explicitly
described in the code.  This should be more efficient, and besides EIBTI.

Also, filled in a few additional IMailingList attributes which were not
documented in the interface.

Show diffs side-by-side

added added

removed removed

Lines of Context:
31
31
from mailman.database.model import Model
32
32
from mailman.database.types import Enum
33
33
from mailman.interfaces.digests import IOneLastDigest
 
34
from mailman.interfaces.member import DeliveryMode
34
35
 
35
36
 
36
37
 
45
46
    address_id = Int()
46
47
    address = Reference(address_id, 'Address.id')
47
48
 
48
 
    delivery_mode = Enum()
 
49
    delivery_mode = Enum(DeliveryMode)
49
50
 
50
51
    def __init__(self, mailing_list, address, delivery_mode):
51
52
        self.mailing_list = mailing_list