Moved sequence indexes from pyams_content package
authorThierry Florac <tflorac@ulthar.net>
Thu, 08 Feb 2018 13:32:22 +0100
changeset 28 83dc4748dbbb
parent 27 486483c8f4e2
child 29 84c17b46a32a
Moved sequence indexes from pyams_content package
src/pyams_sequence/site.py
--- a/src/pyams_sequence/site.py	Thu Feb 08 13:28:09 2018 +0100
+++ b/src/pyams_sequence/site.py	Thu Feb 08 13:32:22 2018 +0100
@@ -16,7 +16,7 @@
 # import standard library
 
 # import interfaces
-from pyams_sequence.interfaces import ISequentialIntIds, ISequentialIdInfo
+from pyams_sequence.interfaces import ISequentialIntIds, ISequentialIdInfo, IInternalReference, IInternalReferencesList
 from pyams_utils.interfaces.site import ISiteGenerations
 from zope.site.interfaces import INewLocalSite
 
@@ -32,8 +32,12 @@
 REQUIRED_UTILITIES = ((ISequentialIntIds, '', SequentialIntIds, 'Sequential IDs'), )
 
 
-REQUIRED_INDEXES = (('oid', FieldIndexWithInterface, {'interface': ISequentialIdInfo,
-                                                      'discriminator': 'hex_oid'}), )
+REQUIRED_INDEXES = [('oid', FieldIndexWithInterface, {'interface': ISequentialIdInfo,
+                                                      'discriminator': 'hex_oid'}),
+                    ('link_reference', FieldIndexWithInterface, {'interface': IInternalReference,
+                                                                 'discriminator': 'reference'}),
+                    ('link_references', KeywordIndexWithInterface, {'interface': IInternalReferencesList,
+                                                                    'discriminator': 'references'})]
 
 
 @subscriber(INewLocalSite)