Question

I'm having trouble saving my model revisions when there are proxy models defined.

class MyModel(models.Model):
    field = model.IntegerField(...)


class MyModelProxy(MyModel):
    class Meta:
        proxy = True


reversion.register(MyModel)

I'm using this proxy model on my views and forms. When I try to save it, it doesn't appear in the table reversion_version. Of course entry for MyModelProxy class is added to appropriate tables. I'm using django-reversion 1.7

Was it helpful?

Solution

I'm the author of django-reversion!

This is a known issue with proxy models, due to a bug in Django's content types framework that was only fixed very recently.

A discussion on the issue can be found here:

https://github.com/etianen/django-reversion/issues/134

Of course, now that the underlying issue with Django has been fixed, pull requests to add proxy model support would be greatly appreciated!

Licensed under: CC-BY-SA with attribution
Not affiliated with StackOverflow
scroll top