Django how to make a dump of tables from a specific database?


Warning: count(): Parameter must be an array or an object that implements Countable in /home/styllloz/public_html/qa-theme/donut-theme/qa-donut-layer.php on line 274
0 like 0 dislike
6 views
Good day, need a fixture tables from a specific database.
This command does not help:
./manage.py dumpdata app.MymOdel --database name_db > data.json

The command does not fail, but the fixture is not created.
Previato how to do it?
by | 6 views

1 Answer

0 like 0 dislike
This database settings.py there? and of course it is necessary to specify the name of settingsof.

+ Note that dumpdata uses the default manager on the model for selecting the records to dump. If you're using a custom manager as the default manager and it filters some of the available records, not all of the objects will be dumped.
by

Related questions

0 like 0 dislike
1 answer
0 like 0 dislike
1 answer
0 like 0 dislike
2 answers
asked Apr 21, 2019 by Serj-B
0 like 0 dislike
1 answer
asked Apr 15, 2019 by Infinite
0 like 0 dislike
1 answer
110,608 questions
257,186 answers
0 comments
28,117 users