nside_wefa.audit.registration

Registration helpers for the audit app.

Three opt-in paths, all of which delegate to auditlog.registry.auditlog.register():

  • Path A — module-level register() at the bottom of models.py.

  • Path Baudited() decorator over the model class.

  • Path CAuditAppConfigMixin declaring audited_models on the consuming app’s AppConfig. The mixin’s ready() walks the dict and calls register() once per entry, after our app has finished its own ready() so that translated settings are in effect.

The settings-only Path D (NSIDE_WEFA.AUDIT.MODELS) is wired by the settings translation layer in nside_wefa.audit.settings_translation and django-auditlog’s register_from_settings.

Functions

audited(**kwargs)

Class decorator equivalent to calling register() on the class.

register(model, **kwargs)

Register a model for auditing.

Classes

AuditAppConfigMixin()

Mixin for consumer AppConfig classes that declare audited models.