예제 #1
0
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']
    )
예제 #2
0
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()
예제 #3
0
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()
예제 #4
0
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()
예제 #5
0
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
    )
예제 #6
0
def upgrade_1001_to_1002(context):

    add_behavior_to_item(context, "seantis.dir.facility", IFacilityDirectoryItem)
예제 #7
0
def upgrade_to_1000(context):

    reset_images(context, (ICouncilDirectory, ICouncilDirectoryItem))
    add_behavior_to_item(
        context, 'seantis.dir.council', ICouncilDirectoryItem
    )
예제 #8
0
def upgrade_3_to_1000(context):

    add_behavior_to_item(
        context, 'seantis.dir.contacts', IContactsDirectoryItem
    )
    reset_images(context, (IContactsDirectory, IContactsDirectoryItem))
예제 #9
0
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'])