Ejemplo n.º 1
0
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
Ejemplo n.º 2
0
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