From bfe0d54514bf4f03bc4a956452541f0103134ba3 Mon Sep 17 00:00:00 2001 From: Tim Graham Date: Sat, 31 Dec 2016 11:24:40 -0500 Subject: Refs #26230 -- Removed support for model name query lookups when using Meta.default_related_name. Per deprecation timeline. --- docs/ref/models/options.txt | 24 ------------------------ docs/releases/2.0.txt | 3 +++ 2 files changed, 3 insertions(+), 24 deletions(-) (limited to 'docs') diff --git a/docs/ref/models/options.txt b/docs/ref/models/options.txt index 5d385adf24..23ea0c673e 100644 --- a/docs/ref/models/options.txt +++ b/docs/ref/models/options.txt @@ -130,30 +130,6 @@ Django quotes column and table names behind the scenes. and the name of the model, both lowercased. See the paragraph on :ref:`related names for abstract models `. - .. deprecated:: 1.10 - - This attribute now affects ``related_query_name``. The old query lookup - name is deprecated:: - - from django.db import models - - class Foo(models.Model): - pass - - class Bar(models.Model): - foo = models.ForeignKey(Foo) - - class Meta: - default_related_name = 'bars' - - :: - - >>> bar = Bar.objects.get(pk=1) - >>> # Using model name "bar" as lookup string is deprecated. - >>> Foo.objects.get(bar=bar) - >>> # You should use default_related_name "bars". - >>> Foo.objects.get(bars=bar) - ``get_latest_by`` ----------------- diff --git a/docs/releases/2.0.txt b/docs/releases/2.0.txt index 3bc2199a39..5734fdd5b2 100644 --- a/docs/releases/2.0.txt +++ b/docs/releases/2.0.txt @@ -350,3 +350,6 @@ these features. * Support for the ``django.core.files.storage.Storage.accessed_time()``, ``created_time()``, and ``modified_time()`` methods is removed. + +* Support for query lookups using the model name when + ``Meta.default_related_name`` is set is removed. -- cgit v1.3