equal
deleted
inserted
replaced
14 |
14 |
15 # import standard library |
15 # import standard library |
16 |
16 |
17 # import interfaces |
17 # import interfaces |
18 from pyramid_mailer.interfaces import IMailer |
18 from pyramid_mailer.interfaces import IMailer |
19 from zope.schema.interfaces import IVocabularyFactory |
|
20 |
19 |
21 # import packages |
20 # import packages |
22 from zope.interface import provider |
21 from pyams_utils.vocabulary import vocabulary_config |
23 from zope.componentvocabulary.vocabulary import UtilityVocabulary |
22 from zope.componentvocabulary.vocabulary import UtilityVocabulary |
24 from zope.schema.vocabulary import getVocabularyRegistry |
|
25 |
23 |
26 |
24 |
27 @provider(IVocabularyFactory) |
25 @vocabulary_config(name='PyAMS mailer utilities') |
28 class MailerVocabulary(UtilityVocabulary): |
26 class MailerVocabulary(UtilityVocabulary): |
29 """Mailer vocabulary""" |
27 """Mailer vocabulary""" |
30 |
28 |
31 interface = IMailer |
29 interface = IMailer |
32 nameOnly = True |
30 nameOnly = True |
33 |
|
34 getVocabularyRegistry().register('PyAMS mailer utilities', MailerVocabulary) |
|