history.snapshots
Overview
Rebuild a deleted row from the last thing history recorded about it.
last_recorded
Return an unsaved model instance holding the row's last recorded values, or None.
A deleted row still has to be nameable. A record that references one prints something about it, and reading the live row would raise. The instance this returns is never saved; it exists so __str__ and the like have the values they need.
None comes back when the model records no history, or when history holds nothing for that row. A field history excludes is simply absent from the instance, keeping its model default.
Signature
last_recorded(model, pk)
Parameters
| Name | Type | Required | Description |
|---|---|---|---|
| model | yes | ||
| pk | yes |
Source
server/vueda/history/snapshots.py:6
Source
server/vueda/history/snapshots.py