コード例 #1
0
def update_effective_date_index(context):
    """Reindex existing AgendaDiaria objects to fix EffectiveDate metadata."""
    catalog = api.portal.get_tool('portal_catalog')
    results = catalog(portal_type='AgendaDiaria')
    for brain in results:
        o = brain.getObject()
        o.reindexObject(idxs=['EffectiveDate'])
    logger.info('{:d} objects reindexed'.format(len(results)))
コード例 #2
0
def update_effective_date_index(context):
    """Reindex existing AgendaDiaria objects to fix EffectiveDate metadata."""
    catalog = api.portal.get_tool('portal_catalog')
    results = catalog(portal_type='AgendaDiaria')
    for brain in results:
        o = brain.getObject()
        o.reindexObject(idxs=['EffectiveDate'])
    logger.info('{0} objects reindexed'.format(len(results)))
コード例 #3
0
def make_content_types_linkable(context):
    """Add package content types to the list of linkables on TinyMCE."""
    tinymce = api.portal.get_tool('portal_tinymce')
    linkable = tinymce.linkable.split()
    for t in ('Agenda', 'AgendaDiaria', 'Compromisso'):
        if t not in linkable:
            linkable.append(t)
            tinymce.linkable = u'\n'.join(linkable)
            logger.info('{} added to linkable types in TinyMCE.'.format(t))
コード例 #4
0
def make_content_types_linkable(context):
    """Add package content types to the list of linkables on TinyMCE."""
    tinymce = api.portal.get_tool('portal_tinymce')
    linkable = tinymce.linkable.split()
    for t in ('Agenda', 'AgendaDiaria', 'Compromisso'):
        if t not in linkable:
            linkable.append(t)
            tinymce.linkable = u'\n'.join(linkable)
            logger.info('{0} added to linkable types in TinyMCE.'.format(t))
コード例 #5
0
def cook_css_resources(context):
    """Cook CSS resources."""
    css_tool = api.portal.get_tool('portal_css')
    css_tool.cookResources()
    logger.info('CSS resources were cooked')
コード例 #6
0
def cook_css_resources(context):
    """Cook CSS resources."""
    css_tool = api.portal.get_tool('portal_css')
    css_tool.cookResources()
    logger.info('CSS resources were cooked')