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
abbb8888
Kaydet (Commit)
abbb8888
authored
Ock 14, 2013
tarafından
David Cramer
Dosyalara gözat
Seçenekler
Dosyalara Gözat
İndir
Eposta Yamaları
Sade Fark
Move logic seperation as its not longer repetitive
üst
6045efa0
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
6 additions
and
9 deletions
+6
-9
deletion.py
django/db/models/deletion.py
+6
-9
No files found.
django/db/models/deletion.py
Dosyayı görüntüle @
abbb8888
...
...
@@ -262,14 +262,6 @@ class Collector(object):
self
.
data
=
SortedDict
([(
model
,
self
.
data
[
model
])
for
model
in
sorted_models
])
def
send_post_delete_signals
(
self
,
model
,
instances
):
if
model
.
_meta
.
auto_created
:
return
for
obj
in
instances
:
signals
.
post_delete
.
send
(
sender
=
model
,
instance
=
obj
,
using
=
self
.
using
)
@force_managed
def
delete
(
self
):
# sort instance collections
...
...
@@ -308,7 +300,12 @@ class Collector(object):
query
=
sql
.
DeleteQuery
(
model
)
pk_list
=
[
obj
.
pk
for
obj
in
instances
]
query
.
delete_batch
(
pk_list
,
self
.
using
)
self
.
send_post_delete_signals
(
model
,
instances
)
if
not
model
.
_meta
.
auto_created
:
for
obj
in
instances
:
signals
.
post_delete
.
send
(
sender
=
model
,
instance
=
obj
,
using
=
self
.
using
)
# update collected instances
for
model
,
instances_for_fieldvalues
in
six
.
iteritems
(
self
.
field_updates
):
...
...
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