Any django reversal tools that follow ContentTypes GenericForeignKey?

I am trying to use django-reversion in a project that also uses GenericForeignKey. I want the reversion to match the shared link. I can't get it to work, and there seems to be no mention of ContentTypes about the django-reversion documentation, I wonder if this is possible. Any ideas?

EDIT: to anyone along this path, I ended up manually managing the revision session and adding the appropriate objects to the reversion, no need to get django-reversion to automatically follow the object's graph.

+6
source share
1 answer

This does not answer a direct question, but answers the problem that we are trying to solve.

ContentTypes is fragile due to the contenttypes ids table.

In our case, we ended up storing a set of related objects that we wanted to synchronize by version in the JSON structure in the database field. We decided that it would be a good idea to store any group of related objects that will be versioned in one very โ€œcontainingโ€, well-defined place.

0
source

Source: https://habr.com/ru/post/886248/


All Articles