Let's say that you want to setup a test environment for major changes to an application that you have created, and you want to make sure that those data existing in your system will easily load into the new system.
Django provides command line facilities for exporting and loading data. Via dumpdata
and loaddata
python manage.py dumpdata app.Model > Model.json
python manage.py loaddata Model.json
The documentation, identifies (although not explicitly) that some signals are ignored during this process:
When fixture files are processed, the data is saved to the database as is. Model defined save methods and pre_save signals are not called. (source)
Is there a way to disable post_save
signal calls during the loaddata
process?
Possibly Related: