django_evolution.conf

Configuration for Django Evolution.

New in version 2.2.

Classes

DjangoEvolutionSettings(settings_module)

Settings for Django Evolution.

class django_evolution.conf.DjangoEvolutionSettings(settings_module)

Bases: object

Settings for Django Evolution.

This wraps the settings defined in django.conf.settings. If settings.DJANGO_EVOLUTION is set, then all supported keys will be loaded.

Legacy settings ( settings.DJANGO_EVOLUTION_ENABLED and settings.CUSTOM_EVOLUTIONS), if found, will be loaded, and will cause a deprecation warning to be emitted.

New in version 2.2.

CUSTOM_EVOLUTIONS

A mapping of app labels to lists of custom evolution modules.

Type:

dict

ENABLED

Whether Django Evolution is enabled.

If enabled, the syncdb and migrate management commands will instead use Django Evolution. Post-syncdb/migrate operations will also cause Django Evolution to track state.

If disabled, the management commands will operate no differently than in a normal Django installation.

Type:

bool

__init__(settings_module)

Initialize the settings wrapper.

Parameters:

settings_module (module) – The Django settings module to load from.

load_settings(settings_module)

Set defaults and load settings.

Parameters:

settings_module (module) – The Django settings module to load from.

replace_settings(new_settings)

Replace settings from a dictionary.

This is expected to take the equivalent of a settings.DJANGO_EVOLUTION dictionary. Any valid settings found will be loaded. Any not found will be set back to defaults.

Parameters:

new_settings (dict) – The new settings dictionary.