browniebroke / django-codemod

A tool to automatically fix Django deprecations.

Home Page:https://django-codemod.readthedocs.io

Geek Repo:Geek Repo

Github PK Tool:Github PK Tool

Replace `Field.rel` by `Field.remote_field`

browniebroke opened this issue · comments

https://docs.djangoproject.com/en/dev/releases/1.9/#field-rel-changes

Field.rel and its methods and attributes have changed to match the related fields API. The Field.rel attribute is renamed to remote_field and many of its methods and attributes are either changed or renamed.

To note from Django 2.0 removals:

Field.remote_field.to attribute will be removed.

  • Deprecated: 1.9
  • Removed: 2.0

Looking more closely, this seems more complicated to implement in a robust fashion.