kolibri/utils/cli.py
def update():
    """
    Called whenever a version change in kolibri is detected

    TODO: We should look at version numbers of external plugins, too!
    """

    logger.info("Running update routines for new version...")

    # Need to do this here, before we run any Django management commands that
    # import settings. Otherwise the updated configuration will not be used
    # during this runtime.

    call_command("collectstatic", interactive=False, verbosity=0)

    from kolibri.core.settings import SKIP_AUTO_DATABASE_MIGRATION

    if not SKIP_AUTO_DATABASE_MIGRATION:
        _migrate_databases()

    with open(version_file(), "w") as f:
        f.write(kolibri.__version__)

    from kolibri.core.content.utils.annotation import update_channel_metadata

    update_channel_metadata()

    from django.core.cache import caches

    cache = caches["built_files"]
    cache.clear()

    Called whenever a version change in kolibri is detected

    TODO: We should look at version numbers of external plugins, too!
    
Called whenever a version change in kolibri is detected
TODO: We should look at version numbers of external plugins, too!
Called whenever a version change in kolibri is detected TODO : We should look at version numbers of external plugins too!
def update():
    logger.info("Running update routines for new version...")
    call_command("collectstatic", interactive=False, verbosity=0)
    from kolibri.core.settings import SKIP_AUTO_DATABASE_MIGRATION
    if not SKIP_AUTO_DATABASE_MIGRATION:
        _migrate_databases()
    with open(version_file(), "w") as f:
        f.write(kolibri.__version__)
    from kolibri.core.content.utils.annotation import update_channel_metadata
    update_channel_metadata()
    from django.core.cache import caches
    cache = caches["built_files"]
    cache.clear()
def update ( ) : logger . info ( "Running update routines for new version..." ) call_command ( "collectstatic" , interactive = False , verbosity = 0 ) from kolibri . core . settings import SKIP_AUTO_DATABASE_MIGRATION if not SKIP_AUTO_DATABASE_MIGRATION : _migrate_databases ( ) with open ( version_file ( ) , "w" ) as f : f . write ( kolibri . __version__ ) from kolibri . core . content . utils . annotation import update_channel_metadata update_channel_metadata ( ) from django . core . cache import caches cache = caches [ "built_files" ] cache . clear ( )
Called whenever a version change in kolibri is detected
TODO: We should look at version numbers of external plugins, too!
Called whenever a version change in kolibri is detected TODO : We should look at version numbers of external plugins too!
"""
    Called whenever a version change in kolibri is detected

    TODO: We should look at version numbers of external plugins, too!
    """ # Need to do this here, before we run any Django management commands that # import settings. Otherwise the updated configuration will not be used # during this runtime.