Thanks, this is useful, but it does not seem to be logging everything. We have a custom user admin page that updates a few models in addition to User: UserInfo, UserExtendProduct, and UserRole. If I add a new user I see this:
+-----------+-------------+-------------+-----------------------------------------------------------------------------------------------------------------------------+-----------------+---------+
| object_id | object_repr | action_flag | change_message | content_type_id | user_id |
+-----------+-------------+-------------+-----------------------------------------------------------------------------------------------------------------------------+-----------------+---------+
| 3 | x | 1 | [{"added": {}}, {"added": {"name": "user info", "object": "x"}}, {"added": {"name": "user extend product", "object": "x"}}] | 4 | 1 |
+-----------+-------------+-------------+-----------------------------------------------------------------------------------------------------------------------------+-----------------+---------+
It shows that a row in User, UserInfo, and UserExtendProdct were added, but it does not show what was added to the latter 2, and it does not show that rows were added to UserRole.
When I modify a user and cause UserRole to be updated I see this:
+-----------+-------------+-------------+----------------+-----------------+---------+
| object_id | object_repr | action_flag | change_message | content_type_id | user_id |
+-----------+-------------+-------------+----------------+-----------------+---------+
| 3 | x | 2 | [] | 4 | 1 |
+-----------+-------------+-------------+----------------+-----------------+---------+
No info about that row being added. If I cause a row in UserRole to be deleted I get the exact same entry, so I cannot distinguish between an add and a delete and I can't see what was added or deleted.
But if I cause a row in UserInfo or UserExtendProduct to be added I see this:
+-----------+-------------+-------------+-----------------------------------------------------------------------------------------------------------------------------+-----------------+---------+
| object_id | object_repr | action_flag | change_message | content_type_id | user_id |
+-----------+-------------+-------------+-----------------------------------------------------------------------------------------------------------------------------+-----------------+---------+
| 3 | x | 1 | [{"added": {}}, {"added": {"name": "user info", "object": "x"}}, {"added": {"name": "user extend product", "object": "x"}}] | 4 | 1 |
+-----------+-------------+-------------+-----------------------------------------------------------------------------------------------------------------------------+-----------------+---------+
Shows an add, but not what was added.
So my questions are:
-how can I get it to show the details of what was added or changed
-why are updates to UserInfo and UserExtendProduct shown, but updates to UserRole are not?
Thanks!