Add compatibility with relation field attribute changes in Django 1.9+.
Review Request #10266 — Created Oct. 23, 2018 and submitted
Django 1.9 replaced
Field.remote_field, along with a
handful of other attributes, as part of an effort to provide a
supported, documented API for field relations.
This change adds compatibility with both the old undocumented API and
the new documented API through the addition of
get_remote_field_model()functions. These are used instead of
Unit tests pass on Django 1.6 through 1.11, and 2.1 with additional
Removed unused imports.
Revision 2 (+171 -64)
Checks run (2 succeeded)