Add pre_insert signal to loaddata command
|Reported by:||Jonas H.||Owned by:||nobody|
|Cc:||Triage Stage:||Design decision needed|
|Has patch:||yes||Needs documentation:||yes|
|Needs tests:||no||Patch needs improvement:||yes|
Here's a patch that adds a
pre_insert signal to the
loaddata command, allowing to do extra modifications on deserialized objects before saving them to the database.
Here's my use case: SQL databases use integer primary keys, MongoDB uses ObjectIds, and I want to re-use SQL-style fixtures (as found in the Django test suite) to test Django MongoDB Engine (the Django MongoDB backend). I think this is a painless way to solve this problem: Very little code changes and doesn't require any ugly hacks.
Would be great if this could be applied!
Change History (12)
comment:1 Changed 6 years ago by
|Patch needs improvement:||unset|
|Version:||1.2 → SVN|
comment:5 Changed 6 years ago by
|Triage Stage:||Unreviewed → Accepted|