Changeset 12004 for main/waeup.ikoba/trunk/src/waeup/ikoba/documents
- Timestamp:
- 20 Nov 2014, 04:11:18 (10 years ago)
- Location:
- main/waeup.ikoba/trunk/src/waeup/ikoba/documents
- Files:
-
- 5 edited
Legend:
- Unmodified
- Added
- Removed
-
main/waeup.ikoba/trunk/src/waeup/ikoba/documents/catalog.py
r11997 r12004 1 ## $Id : catalog.py 8700 2012-06-12 21:01:17Z henrik$1 ## $Id$ 2 2 ## 3 3 ## Copyright (C) 2011 Uli Fouquet & Henrik Bettermann … … 29 29 grok.context(IDocument) 30 30 31 id = grok.index.Field(attribute='id')31 document_id = grok.index.Field(attribute='document_id') -
main/waeup.ikoba/trunk/src/waeup/ikoba/documents/container.py
r11997 r12004 1 ## $Id : container.py 7811 2012-03-08 19:00:51Z uli$1 ## $Id$ 2 2 ## 3 3 ## Copyright (C) 2014 Uli Fouquet & Henrik Bettermann … … 38 38 raise TypeError( 39 39 'DocumentsContainers contain only IDocument instances') 40 self[document. id] = document40 self[document.document_id] = document 41 41 return 42 42 -
main/waeup.ikoba/trunk/src/waeup/ikoba/documents/document.py
r11997 r12004 1 ## $Id : document.py 10842 2013-12-11 13:21:37Z henrik$1 ## $Id$ 2 2 ## 3 3 ## Copyright (C) 2014 Uli Fouquet & Henrik Bettermann … … 54 54 super(Document, self).__init__() 55 55 timestamp = ("%d" % int(time()*10000))[1:] 56 self. id = "d%s" % timestamp56 self.document_id = "d%s" % timestamp 57 57 return 58 58 -
main/waeup.ikoba/trunk/src/waeup/ikoba/documents/interfaces.py
r11997 r12004 1 ## $Id : interfaces.py 11450 2014-02-27 06:25:18Z henrik$1 ## $Id$ 2 2 ## 3 3 ## Copyright (C) 2014 Uli Fouquet & Henrik Bettermann … … 39 39 40 40 """ 41 id = Attribute('Document Identifier')41 document_id = Attribute('Document Identifier') 42 42 history = Attribute('Object history, a list of messages') 43 43 -
main/waeup.ikoba/trunk/src/waeup/ikoba/documents/tests.py
r11997 r12004 1 ## $Id : tests.py 9469 2012-10-30 17:49:17Z henrik$1 ## $Id$ 2 2 ## 3 3 ## Copyright (C) 2014 Uli Fouquet & Henrik Bettermann … … 57 57 container = DocumentsContainer() 58 58 document = createObject(u'waeup.Document') 59 id = document.id59 document_id = document.document_id 60 60 container.addDocument(document) 61 self.assertEqual(container[ id], document)61 self.assertEqual(container[document_id], document) 62 62 self.assertRaises(TypeError, container.addDocument, object()) 63 63 return
Note: See TracChangeset for help on using the changeset viewer.