Changeset 310
- Timestamp:
- 09/21/06 16:27:03 (2 years ago)
- Files:
Legend:
- Unmodified
- Added
- Removed
- Modified
- Copied
- Moved
GeographicEntityLite/trunk/GeographicEntityLite/content/GeographicEntityLite.py
r302 r310 42 42 43 43 ##code-section module-header #fill in your manual code here 44 from Products.GeographicEntityLite.Extensions.cooking import * 44 45 ##/code-section module-header 45 46 … … 152 153 153 154 # Methods 155 security.declarePrivate('at_post_edit_script') 156 def at_post_edit_script(self): 157 newID = setIDFromTitle(self) 158 159 security.declarePrivate('at_post_create_script') 160 def at_post_create_script(self): 161 self.at_post_edit_script() 154 162 155 163 registerType(GeographicEntityLite, PROJECTNAME) GeographicEntityLite/trunk/GeographicEntityLite/content/GeographicNameLite.py
r302 r310 42 42 43 43 ##code-section module-header #fill in your manual code here 44 from Products.GeographicEntityLite.Extensions.cooking import * 44 45 ##/code-section module-header 45 46 … … 148 149 149 150 ##code-section class-header #fill in your manual code here 151 schema['title'].widget.label = 'Transliterated Name' 150 152 ##/code-section class-header 151 153 152 154 # Methods 153 155 security.declarePrivate('at_post_edit_script') 156 def at_post_edit_script(self): 157 newID = setIDFromTitle(self) 158 159 security.declarePrivate('at_post_create_script') 160 def at_post_create_script(self): 161 self.at_post_edit_script() 162 154 163 registerType(GeographicNameLite, PROJECTNAME) 155 164 # end of class GeographicNameLite GeographicEntityLite/trunk/GeographicEntityLite/tests/GeoEntityLite.txt
r306 r310 22 22 >>> entity.portal_type 23 23 'GeographicEntityLite' 24 >>> entity.invokeFactory('GeographicNameLite', id='bbb') 25 'bbb' 26 >>> namity = entity.bbb 27 >>> namity.id 28 'bbb' 29 >>> namity.portal_type 30 'GeographicNameLite' 24 31 25 32 Initialize the test browser … … 49 56 50 57 Check the html content of the view page (description will not appear here) 58 59 >>> browser.contents 60 '...Identifier...' 61 62 >>> browser.contents 63 '...Entity Type...' 64 65 >>> browser.contents 66 '...Modern Name / Location...' 67 68 69 >>> browser.contents 70 '...Time Periods...' 71 72 >>> browser.contents 73 '...Secondary References...' 74 75 >>> browser.contents 76 '...Spatial Coordinates...' 77 78 >>> browser.contents 79 '...Spatial Geometry Type...' 80 51 81 >>> browser.contents 52 82 '...Historical Names...' 83 84 >>> link = browser.getLink('bbb') 85 >>> link.click() 86 87 >>> namity_url = namity.absolute_url() 88 >>> browser.url == namity_url + '/' 89 True 90 91 >>> browser.contents 92 '...Identifier...' 93 94 >>> browser.contents 95 '...Name Type...' 96 97 >>> browser.contents 98 '...Name as Attested...' 99 100 >>> browser.contents 101 '...Language and Writing System of Attested Name...' 102 103 >>> browser.contents 104 '...Time Periods...' 105 106 >>> browser.contents 107 '...Primary References...' 108 109 >>> browser.contents 110 '...Secondary References...' 111 112
