• Create BookmarkCreate Bookmark
  • Create Note or TagCreate Note or Tag
  • PrintPrint
Share this Page URL
Help

Chapter 19. Events and Subscribers > Step 2: Implementing the Mail Subscription...

Step 2: Implementing the Mail Subscription Adapter

The MailSubscriptions implementation should be straightforward. The subscriptions are implemented as a simple tuple data structure, and they are accessible via the annotations adapter. Note that the implementation makes no assumption about the type of annotation that is going to be used; that is, you might use the AttributeAnnotations out of pure convenience, but the data could just as well be stored in LDAP without having any effect on the MailSubscriptions implementation.

Because there is no need to create a new module, you should add the following code to the message.py file:


PREVIEW

                                                                          

Not a subscriber?

Start A Free Trial


  
  • Creative Edge
  • Create BookmarkCreate Bookmark
  • Create Note or TagCreate Note or Tag
  • PrintPrint