Feature to dump payload of files using manage.py dumpdata #335

wants to merge 2 commits into


None yet

4 participants


This is a reference implementation, which allows to dump the files payload together with its meta-data, when running manage.py dumpdata > dumpfile.json.

A dumpfile which is reimported using manage.py loaddata dumpfile.json restores the file on disk.
This simplifies backups and migrations of projects using django-filer to manage their media data.

More details here: https://github.com/jrief/django-filer/blob/serialize-payload/docs/dump_payload.rst

This feature has been discussed on the mailing list in December 2012. It is fully backward compatible with existing dumps.


OMG, yes please!
A test to check for backward compat would be nice

Divio AG member

making it storage backend agnostic would probably be pretty simple, by reading the file contents into a StringIO and then serializing them instead of manually reading them from the filesystem.


The Django maintainers do not seem to be very interested. This ticket
is still "new" since 5 weeks.


Coverage Status

Coverage decreased (-1.35%) when pulling 3f13386 on jrief:serialize-payload into 902d160 on stefanfoulis:develop.


I've implemented tests and storage agnostic dump on top of @jrief great work in https://github.com/nephila/django-filer/tree/feature/dump_data
If everybody agrees I'd close this PR and open a new one


+1 from my side :)


Closing this as it's integrated in #344

@yakky yakky closed this Sep 28, 2013
Divio AG member

cool 👍

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment