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
1b29d328
Kaydet (Commit)
1b29d328
authored
Şub 09, 2014
tarafından
Alasdair Nicol
Kaydeden (comit)
Tim Graham
Şub 09, 2014
Dosyalara gözat
Seçenekler
Dosyalara Gözat
İndir
Eposta Yamaları
Sade Fark
Fixed #21771 -- Made log_deletion consistent with other log methods.
Thanks Keryn Knight for the report.
üst
f90be002
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
3 additions
and
3 deletions
+3
-3
options.py
django/contrib/admin/options.py
+3
-3
No files found.
django/contrib/admin/options.py
Dosyayı görüntüle @
1b29d328
...
...
@@ -758,15 +758,15 @@ class ModelAdmin(BaseModelAdmin):
def
log_deletion
(
self
,
request
,
object
,
object_repr
):
"""
Log that an object will be deleted. Note that this method
is called
before the deletion.
Log that an object will be deleted. Note that this method
must be
called
before the deletion.
The default implementation creates an admin LogEntry object.
"""
from
django.contrib.admin.models
import
LogEntry
,
DELETION
LogEntry
.
objects
.
log_action
(
user_id
=
request
.
user
.
pk
,
content_type_id
=
get_content_type_for_model
(
self
.
model
)
.
pk
,
content_type_id
=
get_content_type_for_model
(
object
)
.
pk
,
object_id
=
object
.
pk
,
object_repr
=
object_repr
,
action_flag
=
DELETION
...
...
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