Comments (3)
One way would be to set skip_history_when_saving = True
on each model instance if you know that no changes have been made (or just avoid calling save()
altogether) 🙂 ..but I'm assuming that you meant that you would prefer that django-simple-history
automatically detects that no changes have been made, and then skips creating a historical record; is this the case?
from django-simple-history.
Assuming the latter (described in my comment above), so closing as duplicate of #302. Please reopen if that's not the case 🙂
from django-simple-history.
Duplicate of #302
from django-simple-history.
Related Issues (20)
- "update_fields" option to "bulk_create" not supported? HOT 1
- Add optimized update_or_create Manager method
- HistoricForeignKey is very slow HOT 2
- Release current main branch to PyPi HOT 1
- Remove the "not created" condition from post_save when skipping history creation HOT 1
- m2m historical records are saved even when SIMPLE_HISTORY_ENABLED = False
- Sending create_historical_record() to celery tasks HOT 8
- Integration with admin.Models failing
- Not null constraint fails with inheritance and m2m fields
- Django polymorphic compatibility
- create_historical_record_m2ms does not respect model's excluded_field_kwargs
- Convenience Method and naming clarification for as_of
- Incorrect rendering of history entry (with editable fields) if changing is disallowed HOT 1
- bulk_update_with_history should use update_fields: history log incorrectly showing phantom changes
- Add support for skip_history_when_saving in M2M fields
- Link a model to a specific record
- What's the use of HistoricForeignKey ? I can't see any foreign key relationship between automatically created related tables inside the database HOT 1
- Add opt-in history enforcement for bulk actions
- How track changes of a Model that is only included as an Inline and nowhere else (Reverse Foreign Key)
Recommend Projects
-
React
A declarative, efficient, and flexible JavaScript library for building user interfaces.
-
Vue.js
🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
-
Typescript
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
-
TensorFlow
An Open Source Machine Learning Framework for Everyone
-
Django
The Web framework for perfectionists with deadlines.
-
Laravel
A PHP framework for web artisans
-
D3
Bring data to life with SVG, Canvas and HTML. 📊📈🎉
-
Recommend Topics
-
javascript
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
-
web
Some thing interesting about web. New door for the world.
-
server
A server is a program made to process requests and deliver data to clients.
-
Machine learning
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
-
Visualization
Some thing interesting about visualization, use data art
-
Game
Some thing interesting about game, make everyone happy.
Recommend Org
-
Facebook
We are working to build community through open source technology. NB: members must have two-factor auth.
-
Microsoft
Open source projects and samples from Microsoft.
-
Google
Google ❤️ Open Source for everyone.
-
Alibaba
Alibaba Open Source for everyone
-
D3
Data-Driven Documents codes.
-
Tencent
China tencent open source team.
from django-simple-history.