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?
Don't create new version if nothing has changed in Django-reversion
1.1k views Asked by pawel.ad At
1
There are 1 answers
Related Questions in DJANGO
- Django Admin Panel and Sub URLs Returning 404 Error on Deployment
- How to return HTTP Get request response from models class in Django project
- Issue with Quantity Increment in Django E-commerce Cart
- Can't install Pipenv on Windows
- use dict from python in django html template and also in js
- 'pyodbc.Cursor' object has no attribute 'callproc', mssql with django
- Django socketio process
- Root path analogue in uWSGI as in Uvicorn
- Django - ModuleNotFoundError: No module named 'backend'
- Does Python being a loosely typed programming language make it less secure?
- sorl-thumbnail adds a background color when padding is used
- Can't connect to local postgresql server from my docker container
- Why ProductHunt api dont work with Python?
- why i have to put extra space in before write option selected because it show error if i don't ' option:selected'
- Django Arrayfield migration to cloud sql (Postgresql) not creating the column
Related Questions in DJANGO-1.8
- Very slow database query migrating from django 1.8 to django 3.2
- Connecting to MSSQL from django 1.8 on Ubuntu
- Inheritance: class method not accessible through use of Foreign Key
- Error: MySQL backend does not support timezone-aware datetimes when USE_TZ is False
- Django Rest Framework: Add hyperlink related field on sub model
- Getting permission denied when I `python manage.py runserver` locally
- ModelChoiceField: remove empty option and select default value
- `django-cron==0.5.0` is not able to run scheduled cron jobs in `python:2.7` and `python:2.7-slim-buster` docker image
- Default selected options in SelectMultiple widget
- Adding iddentifiable non-field errors
- Granular page caching
- How to transfer GeoQuerySet.distance(geom, **kwargs) from Django 1.8 to Django 3.0?
- Handle error of a specific time raised at any point
- Settting up logger to send emails to address different than admins
- ModuleNotFoundError: No module named 'admin'
Related Questions in DJANGO-REVERSION
- django.core.serializers.base.DeserializationError: ['“F(version) + Value(1)” value must be an integer.'] while using reversions
- Django-reversion manually create version
- Django Reversion - How to use With Django Rest
- Trying to install Django reversion
- My django didnt work(I'm studying in tutorial)
- django-reversion conflict with models clean method
- Django reversion recovery from a web page
- How to restore files from secondary model when using Reversion app (DJANGO)
- How to efficiently retrieve value of an attribute at a given time in Django Reversions?
- how to use django-reversion to save possible future objects?
- Django-reversion : incompatible version data during field_dict access
- When using django-reversion, all revisions appear the same
- How create REVERT opportunity in django-reversion app?
- How to combine django-modeltranslation and django-reversion apps?
- django-reversion and django-reversion-compare with User model
Popular Questions
- How do I undo the most recent local commits in Git?
- How can I remove a specific item from an array in JavaScript?
- How do I delete a Git branch locally and remotely?
- Find all files containing a specific text (string) on Linux?
- How do I revert a Git repository to a previous commit?
- How do I create an HTML button that acts like a link?
- How do I check out a remote Git branch?
- How do I force "git pull" to overwrite local files?
- How do I list all files of a directory?
- How to check whether a string contains a substring in JavaScript?
- How do I redirect to another webpage?
- How can I iterate over rows in a Pandas DataFrame?
- How do I convert a String to an int in Java?
- Does Python have a string 'contains' substring method?
- How do I check if a string contains a specific word?
Trending Questions
- UIImageView Frame Doesn't Reflect Constraints
- Is it possible to use adb commands to click on a view by finding its ID?
- How to create a new web character symbol recognizable by html/javascript?
- Why isn't my CSS3 animation smooth in Google Chrome (but very smooth on other browsers)?
- Heap Gives Page Fault
- Connect ffmpeg to Visual Studio 2008
- Both Object- and ValueAnimator jumps when Duration is set above API LvL 24
- How to avoid default initialization of objects in std::vector?
- second argument of the command line arguments in a format other than char** argv or char* argv[]
- How to improve efficiency of algorithm which generates next lexicographic permutation?
- Navigating to the another actvity app getting crash in android
- How to read the particular message format in android and store in sqlite database?
- Resetting inventory status after order is cancelled
- Efficiently compute powers of X in SSE/AVX
- Insert into an external database using ajax and php : POST 500 (Internal Server Error)
You can use the
ignore_duplicatesoption. UnfortunatelyIf you really want to ignore duplicates for follow relations, you have two possibilities:
Remove
and explicithere https://github.com/etianen/django-reversion/blob/master/reversion/revisions.py#L199Set
ignore_duplicatesasTrueby default https://github.com/etianen/django-reversion/blob/master/reversion/revisions.py#L368Be careful, as mentioned above it can be slow.
Set
ignore_duplicatesasFalseand add the signal receiver:It also can be slow, but you can do it asynchronously (in a Celery task, for example):