Questions tagged [django-reversion]

django-reversion is an extension to the Django web framework that provides comprehensive version control facilities.

Features

  • Roll back to any point in a model's history - an unlimited undo facility!
  • Recover deleted models - never lose data again!
  • Admin integration for maximum usability.
  • Group related changes into revisions that can be rolled back in a single transaction.
  • Automatically save a new version whenever your model changes using Django's flexible signalling framework.
  • Automate your revision management with easy-to-use middleware.

django-reversion can be easily added to your existing Django project with an absolute minimum of code changes.

82 questions
21
votes
1 answer

django-reversion and related model

I have the following models.py class Contact(models.Model): pass class Link(models.Model): pass class Relationship(models.Model): # Documentation __doc__ = _(u'Stores a relationship between 2 contacts.') # Attributes …
TonyEight
  • 316
  • 3
  • 11
11
votes
4 answers

Django Admin Using both Django Reversion and Django-Import-Export

I am trying to enable Django Reversion and Django-Import-Export for the same model... Not sure if my logic is correct or if I should be using multiple admin.py files etc I have tried the following but this only allows Django Reversion to work, If I…
xc0m
  • 121
  • 5
11
votes
1 answer

Django reversion does not save revisions made in shell

I did the initial installation steps and created the initial revisions, but then when I save a model in django shell, the new revision is not created: In [1]: s = Shop.objects.all()[0] In [2]: import reversion In [3]: s.name = 'a' In [4]:…
culebrón
  • 34,265
  • 20
  • 72
  • 110
10
votes
1 answer

Django-reversion and south compatibility

Does django-reversion work well with south migrations? Are django-reversion and south compatible? Current versions: - reversion - 1.2.1 - south - 0.7.1
Jonathan Livni
  • 101,334
  • 104
  • 266
  • 359
8
votes
3 answers

How to add django-reversion to an app developed using django and django-rest framework

I have an app developed using Django and Django Rest framework. I would like to add the django-reversion feature to my app. I have already tried http://django-reversion.readthedocs.org/en/latest/api.html#low-level-api but I have failed to make…
Praneeth
  • 902
  • 2
  • 11
  • 25
6
votes
1 answer

Don't create new version if nothing has changed in Django-reversion

I would like to save new object version only if something has changed, in django-reversion. I went through the documentation and didn't find anything about it. How can I achieve it?
pawel.ad
  • 691
  • 1
  • 6
  • 21
6
votes
2 answers

How to create initial revision for test objects when using django-reversion in test case

I'm creating some initial tests as I play with django-revisions. I'd like to be able to test that some of my api and view code correctly saves revisions. However, I can't get even a basic test to save a deleted version. import reversion from…
dbn
  • 13,144
  • 3
  • 60
  • 86
5
votes
1 answer

Tracking a reverse relationship for a foreignkey in django-reversion

I'm trying to figure out how how to track changes for a foreignkey relationship in Django using Django-reversion. In short, I am trying to model a Codelist, which contains Codes which only belong to one Codelist. This can be modelled using a foreign…
user764357
4
votes
1 answer

Show change log history for model instance using django-reversion

Using: django 1.10 reversion 2.0.8. My question is how to show a nice list of changes done to a given model instance. By that I mean that the user can quickly see a list of all the changes (new values for fields) in all revisions. He doesn't need o…
CodeSamurai777
  • 3,285
  • 2
  • 24
  • 42
3
votes
1 answer

django-reversion how to get user-id

I'm using django-reversion for providing history for models I discovered that reversion creates two tables, the table 'reversion_revision' and the 'reversion_version' And in the reversion_revision, are stored the user id who makes last changes.…
Daniel Dias
  • 55
  • 1
  • 10
3
votes
2 answers

django-reversion revert ManyToMany fields outside admin

I am using django-reversion in my project. And it works good except one thing: I can't get previous versions of ManyToMany fields. But in django admin it is works, not in my code. To get previous version I use following code: vprod =…
Eugene Nagorny
  • 1,626
  • 3
  • 18
  • 32
3
votes
1 answer

django-reversion and django-reversion-compare with User model

Hello I have some problems to add django-reversion and django-reversion-compare modules. I created new project and I want to track user_auth log changes with django-reversion (after register User model with django-reversion i wanna use…
user8428395
3
votes
1 answer

Django reversion fails to recover object after migration

I have this model: from django.contrib.auth.models import User from django.db import models import reversion @reversion.register() class BlogPost(models.Model): author = models.ForeignKey(User) title = models.CharField(max_length=32) …
Visgean Skeloru
  • 2,237
  • 1
  • 24
  • 33
3
votes
2 answers

Show field_dict.items() of django-reversion in template

I am tring to use django reversion app in my project. I am little bit comfused. How to show list of changes (field_dict.items()) in template? models.py: @reversion.register() class Function(models.Model): ***FIELDS*** views.py: def…
Nurzhan Nogerbek
  • 4,806
  • 16
  • 87
  • 193
3
votes
0 answers

How can I implement shadow editing (or revisions) across a model with relationships (django)?

While this is django+postgresql, the answer could be generic sql or from a "Databases for Dummies" book. We have a database with several interrelated models (one to one, one to many, and many to many fields). We'd like to allow a user to…
David Frascone
  • 283
  • 1
  • 2
  • 6
1
2 3 4 5 6