history.apps
Overview
AppConfig for the vueda.history application, and its class Vueda feature section.
Classes
track_model
Register pghistory event models and triggers for model under VUEDA's backend policy.
Two callers reach this. The class Vueda.History contributor calls it for every model in the feature-policy family. A model outside that family calls it directly, which is how workflow's configuration and object-state records get event models that share the context field, append-only behaviour, and mandatory exclusions of a policy-driven model.
Call it on a prepared model. The contributor runs on class_prepared, and a direct caller writes the call after the class body, so pghistory sees every field either way. The trackers are built per call rather than shared, because a tracker resolves its trigger condition against the first model it is applied to and keeps it, which leaks one model's field list into the next.
Returns model, so a caller can register and re-export in one statement.
Signature
track_model(model, exclude_fields)
Parameters
| Name | Type | Required | Description |
|---|---|---|---|
| model | yes | ||
| exclude_fields | yes |
Source
server/vueda/history/apps.py:99
Source
server/vueda/history/apps.py