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

Add support for ? and * wildcards in ignored field values #85

Closed jmurty closed 7 years ago

jmurty commented 7 years ago

Permit ignored field values specified directly or via DDF_IGNORED_FIELDS to match model field names using standard wildcard rules where '*' can substitute zero or more characters and '?' can substitute a single character.

This is mainly useful for situations where you need to ignore model fields in bulk where those fields match a specific pattern, such as django-polymorphic's *_ptr pointer fields.

See https://github.com/paulocheque/django-dynamic-fixture/issues/67

jmurty commented 7 years ago

FWIW I have tested and confirmed this change fixes usage with django-polymorphic if you set DDF_IGNORED_FIELDS = ['*_ptr']

paulocheque commented 7 years ago

Amazing!

jmurty commented 7 years ago

Thanks for the merge!