MCPcopy
hub / github.com/django/django / log_deletions

Method log_deletions

django/contrib/admin/options.py:1044–1057  ·  view source on GitHub ↗

Log that objects will be deleted. Note that this method must be called before the deletion. The default implementation creates admin LogEntry objects.

(self, request, queryset)

Source from the content-addressed store, hash-verified

1042 )
1043
1044 def log_deletions(self, request, queryset):
1045 """
1046 Log that objects will be deleted. Note that this method must be called
1047 before the deletion.
1048
1049 The default implementation creates admin LogEntry objects.
1050 """
1051 from django.contrib.admin.models import DELETION, LogEntry
1052
1053 return LogEntry.objects.log_actions(
1054 user_id=request.user.pk,
1055 queryset=queryset,
1056 action_flag=DELETION,
1057 )
1058
1059 def action_checkbox(self, obj):
1060 """

Callers 3

_delete_viewMethod · 0.95
test_log_deletionsMethod · 0.95
delete_selectedFunction · 0.80

Calls 1

log_actionsMethod · 0.80

Tested by 1

test_log_deletionsMethod · 0.76