#circular
Django circular model references
3 February 2008
I’m used to circular references in my model. Often I do a versioning of an Item
with an ItemVersion
. Item
will link to the latest ItemVersion
and ItemVersion
will link to the relevant Item
.
Here’s how you can define your appropriate django models:
Note in the first model, Item
, we reference ItemVersion
in quotes because ItemVersion
is not yet defined.
Read full post