Add pre_insert signal to loaddata command
|Reported by:||jonash||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)
Changed 5 years ago by jonash
comment:1 Changed 5 years ago by jonash
- Needs documentation unset
- Needs tests unset
- Patch needs improvement unset
- Version changed from 1.2 to SVN
comment:5 Changed 4 years ago by julien
- Has patch set
- Needs documentation set
- Needs tests set
- Triage Stage changed from Unreviewed to Accepted
Changed 4 years ago by jonash
comment:8 Changed 4 years ago by russellm
- Triage Stage changed from Accepted to Design decision needed