Changeset 12207 for main/waeup.ikoba/trunk/src/waeup/ikoba/documents
- Timestamp:
- 13 Dec 2014, 07:30:38 (10 years ago)
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
main/waeup.ikoba/trunk/src/waeup/ikoba/documents/container.py
r12005 r12207 21 21 import grok 22 22 from grok import index 23 from waeup.ikoba.interfaces import IIkobaPluggable 23 24 from waeup.ikoba.documents.interfaces import IDocumentsContainer, IDocument 24 25 from waeup.ikoba.utils.helpers import attrs_to_fields … … 39 40 40 41 DocumentsContainer = attrs_to_fields(DocumentsContainer) 42 43 class DocumentsPlugin(grok.GlobalUtility): 44 """A plugin that creates container for documents inside a company. 45 """ 46 grok.implements(IIkobaPluggable) 47 grok.name('documents') 48 49 def setup(self, site, name, logger): 50 if 'documents' in site.keys(): 51 logger.warn('Could not create container for documents.') 52 return 53 site['documents'] = DocumentsContainer() 54 logger.info('Container for documents created') 55 return 56 57 def update(self, site, name, logger): 58 if not 'documents' in site.keys(): 59 self.setup(site, name, logger)
Note: See TracChangeset for help on using the changeset viewer.