Serialize payload of model.FileField when using manage.py dumpdata
|Reported by:||jrief||Owned by:||nobody|
|Has patch:||no||Needs documentation:||no|
|Needs tests:||no||Patch needs improvement:||no|
I added a useful feature to django-filer, which allows to dump the payload of files together with their meta-data, when running
manage.py dumpdata > dumpfile.json
a dumpfile which later is reimported using
manage.py loaddata dumpfile.json
then also restores the payload of the file on disk, not just the meta-data. This simplifies backups and migrations of projects, since an administrator does not require additional tools such as zip or tar. It also makes backups less error prone, since everything is contained in one single file. In my opinion, such a feature would also be useful for models.FileField and models.ImageField.
If this feature is considered useful enough, I would be pleased to implement it into the Django's main code.
More details here: https://github.com/jrief/django-filer/blob/serialize-payload/docs/dump_payload.rst and here: https://github.com/stefanfoulis/django-filer/pull/335