-
-
Notifications
You must be signed in to change notification settings - Fork 320
Description
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
LogEntryshould be created with the appropriate user and timestamp. - The
action_flagshould be set toCHANGE. - The
change_messagemust 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
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.