Changeset 3438 for WAeUP_SRP/base/skins


Ignore:
Timestamp:
16 Apr 2008, 07:04:19 (17 years ago)
Author:
Henrik Bettermann
Message:

change from upper to lower case keys

fillApplicationCategory.py: improve logging

enable export and import of application_category field

remove vocabulary property from layouts

File:
1 edited

Legend:

Unmodified
Added
Removed
  • WAeUP_SRP/base/skins/waeup_utilities/fillApplicationCategory.py

    r3436 r3438  
    1 ## Script (Python) "ti_507_resolve"
     1## Script (Python) "fillApplicationCategory"
    22##bind container=container
    33##bind context=context
     
    3636logger.info('start')
    3737count = 0
     38not_count = 0
    3839found = 0
    3940commit_after = 1000
     
    4142certificates = context.portal_catalog.search({'meta_type': "Certificate"})
    4243logger.info("found %d certificates" % len(certificates))
    43 cat = {'cos': 'BASIC',
    44        'cos_cest': 'CEST',
    45        'cos_sandwich': 'SANDWICH',
     44cat = {'cos': 'basic',
     45       'cos_cest': 'cest',
     46       'cos_sandwich': 'sandwich',
    4647       }
    4748to_change = {}
     
    5960        logger.info("%s in %s" % (cert.id,','.join(found)))
    6061        count += 1
     62    else:
     63        not_count += 1
     64        logger.info("%s not in vocabularies" % (cert.id,))
    6165for cert,d in to_change.items():
    6266    d['cert_doc'].edit(mapping = d)
    63     logger.info("set application_category of %s to %s" % 
     67    logger.info("set application_category of %s to %s" %
    6468               (cert,d['application_category']))
    65 logger.info("found %d not in vocabularies" % count)
     69logger.info("%d cert codes found, %d not found in vocabularies" % (count,not_count))
Note: See TracChangeset for help on using the changeset viewer.