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

0 like 0 dislike
124 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 | 124 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 14, 2019 by Infinite
0 like 0 dislike
1 answer
110,608 questions
257,187 answers
0 comments
40,796 users