You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
After updating to Django 1.10, I'm seeing a deprecation warnings which originate from django-sortedm2m:
...
/Users/<username>/.virtualenvs/<proj>/lib/python3.5/site-packages/sortedm2m/fields.py:334: RemovedInDjango20Warning: Usage of ForeignObjectRel.to attribute has been deprecated. Use the model attribute instead.
to_model = self.rel.to
/Users/<username>/.virtualenvs/<proj>/lib/python3.5/site-packages/sortedm2m/fields.py:354: RemovedInDjango20Warning: Usage of field.rel has been deprecated. Use field.remote_field instead.
if self.rel.to == RECURSIVE_RELATIONSHIP_CONSTANT or to_object_name == klass._meta.object_name:
/Users/<username>/.virtualenvs/<proj>/lib/python3.5/site-packages/sortedm2m/fields.py:354: RemovedInDjango20Warning: Usage of ForeignObjectRel.to attribute has been deprecated. Use the model attribute instead.
if self.rel.to == RECURSIVE_RELATIONSHIP_CONSTANT or to_object_name == klass._meta.object_name:
/Users/<username>/.virtualenvs/<proj>/lib/python3.5/site-packages/sortedm2m/compat.py:37: RemovedInDjango20Warning: Usage of field.rel has been deprecated. Use field.remote_field instead.
db_constraint=field.rel.db_constraint)
/Users/<username>/.virtualenvs/<proj>/lib/python3.5/site-packages/sortedm2m/fields.py:360: RemovedInDjango20Warning: on_delete will be a required arg for ForeignKey in Django 2.0. Set it to models.CASCADE on models and in existing migrations if you want to maintain the current default behavior. See https://docs.djangoproject.com/en/1.10/ref/models/fields/#django.db.models.ForeignKey.on_delete
**get_foreignkey_field_kwargs(self))
...
Most of these look fairly minor, but it just might be slightly annoying to make the changes work across older versions of Django.
The text was updated successfully, but these errors were encountered:
To make things compatible with older Django versions, I usually place a helper function in compat.py. Would you be willing to provide a PR to fix the deprecation warnings?
@gregmuellegger Unfortunately I've moved on to a different company which doesn't use Django - so I wouldn't have any way to test this against an application anymore :(
After updating to Django 1.10, I'm seeing a deprecation warnings which originate from django-sortedm2m:
Most of these look fairly minor, but it just might be slightly annoying to make the changes work across older versions of Django.
The text was updated successfully, but these errors were encountered: