I solved my problem by using the title
field as unique identifiert of my CMSPlugin
objects. When looking for related objects, I first take their titles, and then perform a query that collects all objects with the correct title and language that are published. Surely, this is not a nice solution.
There is a standard way to deal with relations in CMSPlugin
models. One should define a copy_related
method, as explained here. But this solution did not relaiably work for me when the relationships pointed to another CMSPlugin
. This is due to the mechanism how draft pages are turned into published pages.