kronos/__init__.py
def load():
    """
    Load ``cron`` modules for applications listed in ``INSTALLED_APPS``.
    """
    autodiscover_modules('cron')

    if PROJECT_MODULE:
        if '.' in PROJECT_MODULE.__name__:
            try:
                import_module('%s.cron' % '.'.join(
                    PROJECT_MODULE.__name__.split('.')[0:-1]))
            except ImportError as e:
                if 'No module named' not in str(e):
                    print(e)

    # load django tasks
    for cmd, app in get_commands().items():
        try:
            load_command_class(app, cmd)
        except django.core.exceptions.ImproperlyConfigured:
            pass
def load():
    autodiscover_modules('cron')

    if PROJECT_MODULE:
        if '.' in PROJECT_MODULE.__name__:
            try:
                import_module('%s.cron' % '.'.join(
                    PROJECT_MODULE.__name__.split('.')[0:-1]))
            except ImportError as e:
                if 'No module named' not in str(e):
                    print(e)

    # load django tasks
    for cmd, app in get_commands().items():
        try:
            load_command_class(app, cmd)
        except django.core.exceptions.ImproperlyConfigured:
            pass
def load ( ) : autodiscover_modules ( 'cron' ) if PROJECT_MODULE : if '.' in PROJECT_MODULE . __name__ : try : import_module ( '%s.cron' % '.' . join ( PROJECT_MODULE . __name__ . split ( '.' ) [ 0 : - 1 ] ) ) except ImportError as e : if 'No module named' not in str ( e ) : print ( e ) # load django tasks for cmd , app in get_commands ( ) . items ( ) : try : load_command_class ( app , cmd ) except django . core . exceptions . ImproperlyConfigured : pass
Load ``cron`` modules for applications listed in ``INSTALLED_APPS``.
Load cron modules for applications listed in INSTALLED_APPS .