Skip to content
Projeler
Gruplar
Parçacıklar
Yardım
Yükleniyor...
Oturum aç / Kaydol
Gezinmeyi değiştir
D
django
Proje
Proje
Ayrıntılar
Etkinlik
Cycle Analytics
Depo (repository)
Depo (repository)
Dosyalar
Kayıtlar (commit)
Dallar (branch)
Etiketler
Katkıda bulunanlar
Grafik
Karşılaştır
Grafikler
Konular (issue)
0
Konular (issue)
0
Liste
Pano
Etiketler
Kilometre Taşları
Birleştirme (merge) Talepleri
0
Birleştirme (merge) Talepleri
0
CI / CD
CI / CD
İş akışları (pipeline)
İşler
Zamanlamalar
Grafikler
Paketler
Paketler
Wiki
Wiki
Parçacıklar
Parçacıklar
Üyeler
Üyeler
Collapse sidebar
Close sidebar
Etkinlik
Grafik
Grafikler
Yeni bir konu (issue) oluştur
İşler
Kayıtlar (commit)
Konu (issue) Panoları
Kenar çubuğunu aç
Batuhan Osman TASKAYA
django
Commits
b2ffbb00
Kaydet (Commit)
b2ffbb00
authored
Ara 30, 2016
tarafından
Tim Graham
Dosyalara gözat
Seçenekler
Dosyalara Gözat
İndir
Eposta Yamaları
Sade Fark
Refs #24215 -- Removed add_lazy_relation() per deprecation timeline.
üst
ddd32689
Hide whitespace changes
Inline
Side-by-side
Showing
2 changed files
with
2 additions
and
15 deletions
+2
-15
related.py
django/db/models/fields/related.py
+0
-15
2.0.txt
docs/releases/2.0.txt
+2
-0
No files found.
django/db/models/fields/related.py
Dosyayı görüntüle @
b2ffbb00
from
__future__
import
unicode_literals
import
inspect
import
warnings
from
functools
import
partial
from
django
import
forms
...
...
@@ -15,7 +14,6 @@ from django.db.models.deletion import CASCADE, SET_DEFAULT, SET_NULL
from
django.db.models.query_utils
import
PathInfo
from
django.db.models.utils
import
make_model_tuple
from
django.utils
import
six
from
django.utils.deprecation
import
RemovedInDjango20Warning
from
django.utils.encoding
import
force_text
from
django.utils.functional
import
cached_property
,
curry
from
django.utils.lru_cache
import
lru_cache
...
...
@@ -84,19 +82,6 @@ def lazy_related_operation(function, model, *related_models, **kwargs):
return
apps
.
lazy_model_operation
(
partial
(
function
,
**
kwargs
),
*
model_keys
)
def
add_lazy_relation
(
cls
,
field
,
relation
,
operation
):
warnings
.
warn
(
"add_lazy_relation() has been superseded by lazy_related_operation() "
"and related methods on the Apps class."
,
RemovedInDjango20Warning
,
stacklevel
=
2
)
# Rearrange args for new Apps.lazy_model_operation
def
function
(
local
,
related
,
field
):
return
operation
(
field
,
related
,
local
)
lazy_related_operation
(
function
,
cls
,
relation
,
field
=
field
)
class
RelatedField
(
Field
):
"""
Base class that all relational fields inherit from.
...
...
docs/releases/2.0.txt
Dosyayı görüntüle @
b2ffbb00
...
...
@@ -252,3 +252,5 @@ these features.
* The ``on_delete`` argument for ``ForeignKey`` and ``OneToOneField`` are now
required.
* ``django.db.models.fields.add_lazy_relation()`` is removed.
Write
Preview
Markdown
is supported
0%
Try again
or
attach a new file
Attach a file
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment