1

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!

MHS
  • 2,260
  • 11
  • 31
  • 45
  • Hold on `makefixture`? There is no such command. Did you mean `dumpdata` command? – Aamir Rind Jun 18 '13 at 13:48
  • A 3rd party django app, `"django-test-utils" github.com/ericholscher/django-test-utils` contains a makefixture command implementation which is basically a smarter dumpdata. – MHS Jun 18 '13 at 13:51
  • 1
    @PauloBu dumpdata does not allow subsets of data from database. – MHS Jun 18 '13 at 14:41

1 Answers1

2

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.

Aamir Rind
  • 38,793
  • 23
  • 126
  • 164