MHS
MHS

Reputation: 2350

How to make a fixture of entire django project for limited data in database?

I have a Django--1.3 project that contains 40+ applications in it I have found this to make limited data fixture:

manage.py makefixture --format=json --indent=4 proj.appname.modelname[1:1000] > test.json

But this makes a fixture for only 1 app at a time.
Is there any way that enables me to make fixtures just by running one command?
Please Help!

Upvotes: 1

Views: 381

Answers (1)

Aamir Rind
Aamir Rind

Reputation: 39659

You can have space in between multiple app names:

manage.py makefixture --format=json --indent=4 proj.appname.modelname[1:1000] proj.another_appname.modelname[1:1000] > test.json

Help comes directly from the library, see here.

Upvotes: 2

Related Questions