def upgrade_1000_to_1001(context): add_behavior_to_item(context, 'seantis.dir.events', IEventsDirectoryItem) reset_images_and_attachments( context, (IEventsDirectory, IEventsDirectoryItem), ['image', 'attachment_1', 'attachment_2'] )
def upgrade_to_1000(context): # add the new index first as the next step also does a reindex of all items setup = getToolByName(context, 'portal_setup') setup.runImportStepFromProfile( 'profile-seantis.dir.roadworks:default', 'catalog' ) reset_images_and_attachments( context, (IRoadworksDirectory, IRoadworksDirectoryItem) ) add_behavior_to_item( context, 'seantis.dir.roadworks', IRoadworksDirectoryItem )
def upgrade_1000_to_1001(context): add_behavior_to_item(context, 'seantis.dir.events', IEventsDirectoryItem) reset_images_and_attachments(context, (IEventsDirectory, IEventsDirectoryItem), ['image', 'attachment_1', 'attachment_2'])