construct_change_message
Construct a JSON structure describing changes from a changed object. Translations are deactivated so that strings are stored untranslated. Translation happens later on LogEntry access.
def construct_change_message(
form: django.forms.ModelForm,
formsets: list,
add: bool
) - > list
Construct a JSON structure describing changes from a changed object. Translations are deactivated so that strings are stored untranslated. Translation happens later on LogEntry access.
Parameters
| Name | Type | Description |
|---|---|---|
| form | django.forms.ModelForm | The main form instance containing the changed data for the primary object. |
| formsets | list | A collection of formsets representing related objects that may have been added, modified, or deleted. |
| add | bool | A flag indicating whether the primary object is being created for the first time. |
Returns
| Type | Description |
|---|---|
list | A list of dictionaries representing the additions, changes, and deletions made to the object and its related formsets. |