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

Set DDF_IGNORE_FIELDS or ignore_fields argument using wild cards #67

Closed rpalacios closed 7 years ago

rpalacios commented 9 years ago

Hi.

It would be nice to set DDF_IGNORE_FIELDS or ignore_fields argument using wild cards.

You could want to ignore a set of fields in one or more models.

By example, when I start using this app on my unit tests, I always get AttributeError on polymorphic models. This exception is documented on django-polymorphic documentation.

To workaorund this, I had to set all fields that ends with "_ptr" to be ignored.

It would be nice to be able to set DDF_IGNORE_FIELDS = ['*_ptr'].

Just one suggestion.

Best regards, Roger

paulocheque commented 9 years ago

Excellent suggestion, thanks!

If you are able to create a Pull Request for that, I will be happy to merge it.

jmurty commented 7 years ago

FYI this feature is now merged into master from https://github.com/paulocheque/django-dynamic-fixture/pull/85

@paulocheque You may want to mark this ticket as fixed now, or once the merged change is released?

paulocheque commented 7 years ago

Thanks!