ecometrica / django-multisite

Multisite in django — use one Django app to serve multiple domains
BSD 3-Clause "New" or "Revised" License
138 stars 42 forks source link

rel.to removed in Django 2.0 #47

Closed JordanReiter closed 6 years ago

JordanReiter commented 6 years ago

rel.to is removed in Django 2.0. For backwards compatibility I check first for remote_field (the updated name for the same property) then fall back on .rel.to. .remote_field is supported from Django 1.9+. I also replaced one call to ._meta.get_field_by_name(…)[0] to ._meta.get_field(…) as it does the same thing and get_field_by_name is no longer supported.

coveralls commented 6 years ago

Coverage Status

Coverage decreased (-1.07%) to 70.566% when pulling ed03de35a8889574bb3cb562a5efd2c279ddb7fb on JordanReiter:RelToRemovedInDjango20 into b356f21dfb0686fb6dfad6144d6fd86e35b9cd26 on ecometrica:master.

coveralls commented 6 years ago

Coverage Status

Coverage decreased (-0.8%) to 70.823% when pulling ed03de35a8889574bb3cb562a5efd2c279ddb7fb on JordanReiter:RelToRemovedInDjango20 into b356f21dfb0686fb6dfad6144d6fd86e35b9cd26 on ecometrica:master.

damon-rand commented 6 years ago

Thanks @JordanReiter for the PR. My apologies for the lag in reply.