Skip to content

Feature Request: Comprehensive Admin LogEntry for Configuration Changes #635

@mahdirahimi1999

Description

@mahdirahimi1999

Problem

Changes made to settings via the Constance Admin interface are currently not recorded in Django's standard LogEntry model (django_admin_log).

This missing audit trail is a significant gap for applications used in environments with multiple superusers, as it prevents us from tracking who changed what and when for critical, live configuration settings.

Use Case

We require a reliable, field-level audit log for all Constance configuration updates to ensure:

  • Accountability: Knowing which user made which change.
  • Debugging: Quickly identifying if a configuration change caused a production issue.
  • Compliance: Meeting internal or external audit requirements.

Expected Behavior

Upon saving Constance settings via the Admin interface:

  1. A standard Django LogEntry should be created with the appropriate user and timestamp.
  2. The action_flag should be set to CHANGE.
  3. The change_message must be precise, listing only the fields that were actually modified in that save operation (e.g., Updated settings: STRING_VALUE, DATE_VALUE).
  4. If no changes were made to any field, no LogEntry should be created.

Benefits

Adding this functionality provides a first-class audit trail aligned with Django Admin standards, significantly improving the governance and operational visibility of systems using django-constance.


I believe this feature is essential for robust production usage and would be happy to discuss contributing to its implementation.

Metadata

Metadata

Assignees

Labels

Type

No type

Projects

No projects

Milestone

No milestone

Relationships

None yet

Development

No branches or pull requests

Issue actions