equal
deleted
inserted
replaced
20 from zope.annotation.interfaces import IAttributeAnnotatable, IAnnotations |
20 from zope.annotation.interfaces import IAttributeAnnotatable, IAnnotations |
21 from zope.keyreference.interfaces import IKeyReference |
21 from zope.keyreference.interfaces import IKeyReference |
22 |
22 |
23 # import packages |
23 # import packages |
24 from chameleon import PageTemplateFile |
24 from chameleon import PageTemplateFile |
|
25 from pyams_utils.container import ParentSelector |
25 from pyams_utils.context import ContextSelector |
26 from pyams_utils.context import ContextSelector |
26 from pyams_utils.request import get_annotations, get_debug, RequestSelector |
27 from pyams_utils.request import get_annotations, get_debug, RequestSelector |
27 from pyams_utils.site import site_factory |
28 from pyams_utils.site import site_factory |
28 from pyams_utils.tales import ExtensionExpr |
29 from pyams_utils.tales import ExtensionExpr |
29 from pyams_utils.traversing import NamespaceTraverser |
30 from pyams_utils.traversing import NamespaceTraverser |
48 # add traverser handling namespaces via "++ns++(options)" URLs |
49 # add traverser handling namespaces via "++ns++(options)" URLs |
49 config.add_traverser(NamespaceTraverser) |
50 config.add_traverser(NamespaceTraverser) |
50 |
51 |
51 # add custom subscriber predicate to filter events via supported interface(s) |
52 # add custom subscriber predicate to filter events via supported interface(s) |
52 config.add_subscriber_predicate('context_selector', ContextSelector) |
53 config.add_subscriber_predicate('context_selector', ContextSelector) |
|
54 config.add_subscriber_predicate('parent_selector', ParentSelector) |
53 config.add_subscriber_predicate('request_selector', RequestSelector) |
55 config.add_subscriber_predicate('request_selector', RequestSelector) |
54 |
56 |
55 # load registry components |
57 # load registry components |
56 config.registry.registerAdapter(AttributeAnnotations, (IAttributeAnnotatable, ), IAnnotations) |
58 config.registry.registerAdapter(AttributeAnnotations, (IAttributeAnnotatable, ), IAnnotations) |
57 config.registry.registerAdapter(KeyReferenceToPersistent, (IPersistent, ), IKeyReference) |
59 config.registry.registerAdapter(KeyReferenceToPersistent, (IPersistent, ), IKeyReference) |