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

UnsupportedFieldError on GenericIPAddressField #54

Closed learner010 closed 9 years ago

learner010 commented 9 years ago

I have a GenericIPAddressField in a model.

Believing django-dynamic-fixture currently doesn't support it. I wrote a fixture for it.

DDF_FIELD_FIXTURES = {
    'django.db.models.GenericIPAddressField': {'ddf_fixture': lambda: "{}.{}.{}".format(randint(000,999), randint(000,999), randint(000,999))},
}

But it still complains about it. How to fix this?

paulocheque commented 9 years ago

I added support for the GenericIPAddressField field in the master branch (https://github.com/paulocheque/django-dynamic-fixture/commit/c0254e388e6daafdd9b95f1cc27892eb6f2f09d4). It will be include in the new version of DDF. Thanks for reporting!!