Pregunta

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!

¿Fue útil?

Solución

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.

Licenciado bajo: CC-BY-SA con atribución
No afiliado a StackOverflow
scroll top