コード例 #1
0
ファイル: apps.py プロジェクト: loftiskg/CATMAID
def check_history_setup(app_configs, **kwargs):
    messages = []
    # Enable or disable history tracking, depending on the configuration.
    # Ignore silently, if the database wasn't migrated yet.
    if getattr(settings, 'HISTORY_TRACKING', True):
        run = history.enable_history_tracking(True)
    else:
        run = history.disable_history_tracking(True)

    if not run:
        messages.append(
            Warning("Couldn't check history setup, missing database functions",
                    hint="Migrate CATMAID"))
    return messages
コード例 #2
0
ファイル: apps.py プロジェクト: davidhildebrand/CATMAID
def check_history_setup(app_configs, **kwargs):
    messages = []
    # Enable or disable history tracking, depending on the configuration.
    # Ignore silently, if the database wasn't migrated yet.
    if getattr(settings, 'HISTORY_TRACKING', True):
        run = history.enable_history_tracking(True)
    else:
        run = history.disable_history_tracking(True)

    if not run:
        messages.append(Warning(
            "Couldn't check history setup, missing database functions",
            hint="Migrate CATMAID"))
    return messages