def populate_catalog_script(args, root, **kw): added, changed = populate_catalog(root.catalog) print "-- Results: %s added and %s changed" % (len(added), len(changed)) if added: "-- Added indexes: '%s'" % "', '".join(added) if changed: "-- Changed indexes: '%s'" % "', '".join(changed) if added or changed: print "-- NOTE: You need to run reindex_catalog too since indexes have changed."
def __init__(self, data=None, **kwargs): self.catalog = Catalog() self.document_map = DocumentMap() populate_catalog(self.catalog) self.__site_settings__ = OOBTree() super(Root, self).__init__(data=data, **kwargs)