paulocheque / django-dynamic-fixture

A complete library to create dynamic model instances for testing purposes.
http://django-dynamic-fixture.readthedocs.io/
Other
390 stars 67 forks source link

Fix generating fixtures for polymorphic models #43

Closed tomd-aptivate closed 4 years ago

tomd-aptivate commented 10 years ago

If the model is a PolymorphicModel then it has a polymorphic_ctype field which shouldn't be touched, changing it will cause the model not to be found by its own querysets.

paulocheque commented 10 years ago

Awesome. Bu do you know why the Travis CI build has failed?

variable commented 9 years ago

Any chance of getting this to merge? Looking at the error log, it seems the polymorphic package was not installed properly.

asteinlein commented 9 years ago

Would love to see this fixed and merged. Just came across this library, which is really sweet, but was hit with this issue right away since we're using Django Polymorphic.

asteinlein commented 9 years ago

By the way, I tried this patch, and it doesn't work for me with a model that extends a model that is a PolymorphicModel (Quiz is a PolymorphicModel, and PrizeQuiz is another model that extends Quiz). Not sure if that is related to polymorphic models specifically, or model subclasses in general.

paulocheque commented 4 years ago

Closing in favor of https://github.com/paulocheque/django-dynamic-fixture/pull/112