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

Make `get_related_model` Django 2.0 -compatible #86

Closed 7mp closed 7 years ago

7mp commented 7 years ago

I get a deprecation warning on Django 1.10:

/.../lib/python2.7/site-packages/django_dynamic_fixture/django_helper.py:168: RemovedInDjango20Warning: Usage of ForeignObjectRel.to attribute has been deprecated. Use the model attribute instead.

This commit removes the warning in a backwards compatible way.

paulocheque commented 7 years ago

Amazing!