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
2
votes
0 answers

Django transaction management among different http requests

I have been working on a DJANGO back-end which main use case would be the capability to store a given set of pictures with its related tags. The current design foresees dedicated REST-ful APIs for creating a new set, adding a picture to a given set…
codeJack
  • 2,423
  • 5
  • 24
  • 31
2
votes
1 answer

django-reversion saves revisions correctly in shell, but not in views

I'm facing an issue which is somewhat reverse of Django reversion does not save revisions made in shell Versions being used: Django: v1.3.1 django-reversion: v1.5.7 I wrote a class that can be used to save/discard changes made to a model: import…
rajivRaja
  • 527
  • 3
  • 6
  • 16
2
votes
0 answers

integration django-reversion with tastypie

I'would like to store history of my model changes. I found django-reversion extension and it looks quite nice but I have no idea how to intergrate it with tastypie. My example models: class Author(models.Model): name =…
ASmith78
  • 153
  • 8
1
vote
2 answers

Previous version of a django-reversion controlled object

I'm using what the django-reversion documents call the low-level API in order to access the reversion history in my own code, apart from the admin. To store metadata, I've extended the Revision model by setting up my own model including a…
Etaoin
  • 8,444
  • 2
  • 28
  • 44
1
vote
0 answers

Django Reversion - How to use With Django Rest

I'm trying to use Django Reversion with my django-rest, but i still confuse about it or i just couldn't what i want in Document. Here what i tried Settings INSTALLED_APPS = [ .... 'reversion' ] MIDDLEWARE = [ …
latenight
  • 135
  • 3
  • 13
1
vote
1 answer

django-reversion conflict with models clean method

i use django-reversion to controll changes of my models but i have a problem with the models clean method. For example my model looks like this: class Document(models.Model): name = models.CharField(max_length=255, blank=True, null=True) …
Basti G.
  • 411
  • 1
  • 5
  • 26
1
vote
1 answer

How to restore files from secondary model when using Reversion app (DJANGO)

I have 2 models: Model1(models.Model): and Model2(models.Model): fk = models.ForeignKey("Model1", on_delete=models.CASCADE) image = models. ImageField(…..) I use Reversion app to restore all deleted data and both models are registered in admin…
Aleksei Khatkevich
  • 1,923
  • 2
  • 10
  • 27
1
vote
2 answers

How to efficiently retrieve value of an attribute at a given time in Django Reversions?

I am currently using django-reversion to track a model Account which has a field total_spent. Overtime this field gets updated whenever an accounts spends money. My goal is to retrieve the value of total_spent between X and Y, which are both…
Tinker
  • 4,165
  • 6
  • 33
  • 72
1
vote
0 answers

how to use django-reversion to save possible future objects?

I'm creating a website with Django using the Rest Framework, it enables users to modify or create new objects, kinda like Wikipedia where anyone can make edits but it has to go through a process to be accepted. I understand the default behavior for…
1
vote
1 answer

Django-reversion : incompatible version data during field_dict access

I have the following script: import django import os import sys from django.db import transaction from xxx.models import File import reversion from reversion.models import Version from datetime import datetime # Creating a file entry in here: with…
OneRaynyDay
  • 3,658
  • 2
  • 23
  • 56
1
vote
0 answers

How create REVERT opportunity in django-reversion app?

I have task to rewrite correct Function Based View to Class Based View. Below you can see my code. My question is whats wrong with my Class Based View? It raise error. Where is my mistake? FBV: @reversion.create_revision() def…
1
vote
2 answers

Django NoReverseMatch Error when passing arguments on redirect

Hi im trying to redirect from one view function to another and passing a list of lists as argument. urls.py urlpatterns = [ url(r'^admin/', admin.site.urls), url(r'^checkFiles/', views.checkFiles, name='checkoutFiles'), url(r'^$',…
Panagiotis Simakis
  • 1,245
  • 1
  • 18
  • 45
1
vote
0 answers

Show more information about ManyToMany field?

I use django-reversion app in my project. I have modal "Task" with ManyToMany field "comments". In my project I have page with revertions list. And it shows me in comments field id of comments. For example: comments (field_name): [66, 67, 68]…
Nurzhan Nogerbek
  • 4,806
  • 16
  • 87
  • 193
1
vote
0 answers

Django reversion - Get old model with old model children (get historical object)

I'm trying to get an old version of an object and then also get the old children belonging to that model. I'll try to add an example here: parent_object.teams.count() # => 10 And then after fetching the old model with something like…
Ole Henrik Skogstrøm
  • 6,353
  • 10
  • 57
  • 89
1
vote
1 answer

Undoing cascade deletions in a dense database

I have a fairly large production database system, based on a large hierarchy of nodes each with a 10+ associated models. If someone deletes a node fairly high in the tree, there can be thousands of models deleted and if that deletion was a mistake,…