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:
- A standard Django
LogEntry should be created with the appropriate user and timestamp.
- The
action_flag should be set to CHANGE.
- 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).
- 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.
Problem
Changes made to settings via the Constance Admin interface are currently not recorded in Django's standard
LogEntrymodel (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:
Expected Behavior
Upon saving Constance settings via the Admin interface:
LogEntryshould be created with the appropriate user and timestamp.action_flagshould be set toCHANGE.change_messagemust be precise, listing only the fields that were actually modified in that save operation (e.g.,Updated settings: STRING_VALUE, DATE_VALUE).LogEntryshould 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.