- Added
./manage.py f3dumpdata -
which allows reading JSON data from stdin. - Added Python 3.12, 3.13 and Django 5.0, 5.1.
- Order objects by their primary key when dumping specs. This helps with comparing JSON files by hand.
- Fixed the broken argument validation of
./manage.py f3dumpdata
. - Switched to hatchling and ruff.
- Made
specs_for_*_models
helpers return a list instead of a generator. - Changed the
assert
statement for checking the dump version into araise
statement since assertions could be optimized out. - Renamed
InvalidSpec
toInvalidSpecError
to make ruff happier. - Added an
objects
argument todump_specs
which allows overriding the list of objects to dump.
0.5 (2023-03-15)
- Added argument validation to
./manage.py f3dumpdata
instead of crashing when the dataset isn't known. - Added the
defer_values
spec field which allows specifying a list of fields whose real values should be deferred and only saved after missing data has been deleted. This is especially useful when you have unique fields where partial updates could produce constraint validation errors (unique constraints cannot be deferred it seems).
0.4 (2023-02-13)
- Added various tests for expected behavior.
- Refactored
load_dump
to pass the code complexity checker. - Added an expected failure test which shows that handling unique fields isn't yet working in all cases.
- Added Django 4.2a1 to the CI matrix.
- Allowed data loading with
save_as_new
to work in more scenarios where the data contains cyclic dependencies.
0.3 (2022-09-19)
- Fixed a crash when using nullable foreign keys to a model which uses
save_as_new
. - Fix a behavior when using
save_as_new
together withdelete_missing
: When the parent of a model with both flags set is updated, the content is now duplicated (because the old object hadn't been removed and the new one has been saved according tosave_as_new
). Previously, the old object has been removed automatically. Worse, this made is impossible to usesave_as_new
for duplicating top-level objects (their object graph would be removed after inserting the copy). This change may still be backwards incompatible for you though, so better check twice. - Fixed deletion of missing objects in the presence of protected objects by processing specs in reverse.
- Changed
specs_for_derived_models
to skip proxy models instead of skipping unmanaged models. - Started deferring constraints and resetting sequences when loading dumps.
0.2 (2022-09-02)
- Added Django 4.1.
- Added the
mappers
argument todump_specs
which allows changing the serialized representation of models before writing the JSON. - Changed
load_dump
to also validate specs. - Replaced
FEINCMS3_DATA_SPECS
with the more flexible and opinionatedFEINCMS3_DATA_DATASETS
.
0.1 (2021-09-27)
- Initial release!