ObjectRevisionField
Overview
Publishes the annotated revision as app_label.Model:event_id.
Null when the object has no events yet, which is what a row written before its model was tracked looks like. It names the tracked model rather than the event model, so the value stays stable if the backend's own naming changes.
init {#init}
When a field is instantiated, we store the arguments that were used, so that we can present a helpful representation of the object.
Signature {#init-signature}
__init__(cls, args, kwargs)
Parameters {#init-parameters}
| Name | Type | Required | Description |
|---|---|---|---|
| cls | yes | ||
| args | yes | ||
| kwargs | yes |
Source {#init-source}
.venv/lib/python3.11/site-packages/rest_framework/fields.py:614
to_representation
Transform the outgoing native value into primitive data.
Signature
to_representation(self, instance)
Parameters
| Name | Type | Required | Description |
|---|---|---|---|
| self | yes | ||
| instance | yes |
Source
server/vueda/history/revision.py:99
_spectacular_annotation
Source
server/vueda/history/revision.py:83