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_1004_to_1005(context): # add collective.geo.behaviour setup = getToolByName(context, "portal_setup") setup.runAllImportStepsFromProfile("profile-collective.geo.behaviour:default") add_behavior_to_item(context, "seantis.dir.facility", IFacilityDirectoryItem) # update css and js getToolByName(context, "portal_css").cookResources() getToolByName(context, "portal_javascripts").cookResources()
def upgrade_1007_to_1008(context): # add collective.geo.behaviour setup = getToolByName(context, 'portal_setup') setup.runAllImportStepsFromProfile( 'profile-collective.geo.behaviour:default') add_behavior_to_item(context, 'seantis.dir.events', IEventsDirectoryItem) # update css and js getToolByName(context, 'portal_css').cookResources() getToolByName(context, 'portal_javascripts').cookResources()
def upgrade_1000_to_1001(context): # add collective.geo.behaviour setup = getToolByName(context, 'portal_setup') setup.runAllImportStepsFromProfile( 'profile-collective.geo.behaviour:default' ) add_behavior_to_item( context, 'seantis.dir.roadworks', IRoadworksDirectoryItem ) # update css and js getToolByName(context, 'portal_css').cookResources() getToolByName(context, 'portal_javascripts').cookResources()
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_1001_to_1002(context): add_behavior_to_item(context, "seantis.dir.facility", IFacilityDirectoryItem)
def upgrade_to_1000(context): reset_images(context, (ICouncilDirectory, ICouncilDirectoryItem)) add_behavior_to_item( context, 'seantis.dir.council', ICouncilDirectoryItem )
def upgrade_3_to_1000(context): add_behavior_to_item( context, 'seantis.dir.contacts', IContactsDirectoryItem ) reset_images(context, (IContactsDirectory, IContactsDirectoryItem))
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'])