~barry/mailman/events-and-web

« back to all changes in this revision

Viewing changes to src/mailman/model/autorespond.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:
33
33
from mailman.database.model import Model
34
34
from mailman.database.types import Enum
35
35
from mailman.interfaces.autorespond import (
36
 
    IAutoResponseRecord, IAutoResponseSet)
 
36
    IAutoResponseRecord, IAutoResponseSet, Response)
37
37
from mailman.utilities.datetime import today
38
38
 
39
39
 
49
49
    mailing_list_id = Int()
50
50
    mailing_list = Reference(mailing_list_id, 'MailingList.id')
51
51
 
52
 
    response_type = Enum()
 
52
    response_type = Enum(Response)
53
53
    date_sent = Date()
54
54
 
55
55
    def __init__(self, mailing_list, address, response_type):