One of our servers has 4 gb of data. But as of now i am only interested in populating only little data for fixtures. One easy of dumping data is:
python manage.py dumpdata --indent=4 > shipping_fixture.json
but the trouble with this is that it dumps all the data into the database. Working with such a massive amount of data on the test does not make any sense. Is there any way out where i can limit the amount of data that does not make things heavy for me, and the data i downloaded is complete in itself.
The latest django (1.5.5) doesn't have such an option, but I think it's coming up soon in a future version. There is currently a ticket implementing a new feature to the dumpdata command that will allow you to filter what gets outputted based on the primary key if the model is specified.
A 3rd party app called django-test-utils can probably do what you need.
Use Django dumpdata to dump a subset of overall data?
If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!
Donate Us With