Kaydet (Commit) 625e9da9 authored tarafından Tim Graham's avatar Tim Graham

Removed Field.rel and Field.remote_field.to per deprecation timeline.

üst 0f454f5d
......@@ -251,13 +251,6 @@ class Field(RegisterLookupMixin):
else:
return []
@property
def rel(self):
warnings.warn(
"Usage of field.rel has been deprecated. Use field.remote_field instead.",
RemovedInDjango20Warning, 2)
return self.remote_field
def _check_choices(self):
if self.choices:
if (isinstance(self.choices, six.string_types) or
......
......@@ -11,10 +11,7 @@ they're the closest concept currently available.
from __future__ import unicode_literals
import warnings
from django.core import exceptions
from django.utils.deprecation import RemovedInDjango20Warning
from django.utils.encoding import force_text
from django.utils.functional import cached_property
......@@ -56,14 +53,6 @@ class ForeignObjectRel(object):
# __init__ as the field doesn't have its model yet. Calling these methods
# before field.contribute_to_class() has been called will result in
# AttributeError
@property
def to(self):
warnings.warn(
"Usage of ForeignObjectRel.to attribute has been deprecated. "
"Use the model attribute instead.",
RemovedInDjango20Warning, 2)
return self.model
@cached_property
def hidden(self):
return self.is_hidden()
......
......@@ -247,3 +247,5 @@ these features.
* The ``host`` argument to ``SimpleTestCase.assertsRedirects()`` is removed.
The compatibility layer which allows absolute URLs to be considered equal to
relative ones when the path is identical is also removed.
* ``Field.rel`` and ``Field.remote_field.to`` are removed.
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment