gregmuellegger / django-autofixture

Can create auto-generated test data.
BSD 3-Clause "New" or "Revised" License
460 stars 118 forks source link

Recursive generate_fx #92

Open marco-silva0000 opened 8 years ago

marco-silva0000 commented 8 years ago

I may be watching at it wrong, but I have a problem even using generate_fx=True, because I think it will only create fk of the model being fixtured. In my example I have Equipment, with Device, With Sector, with Facility, all foreign keys, being device and sector m2m. and I would like to create an Equipment, without manually creating all the rest of the setup. As discussed here, #58 , sometimes it would be great to recursively generate foreign key relations. maybe there could be a keyword that would specify the recursive limit or something

marco-silva0000 commented 8 years ago

I was missing generate_m2m... the Model that I'm generating doesn't have any, but its 'parents' have, so without that option I would get an error(that told-me to use generate_fk or follow_fk)