Log that an object has been successfully added. The default implementation creates an admin LogEntry object.
(self, request, obj, message)
| 1010 | return self.paginator(queryset, per_page, orphans, allow_empty_first_page) |
| 1011 | |
| 1012 | def log_addition(self, request, obj, message): |
| 1013 | """ |
| 1014 | Log that an object has been successfully added. |
| 1015 | |
| 1016 | The default implementation creates an admin LogEntry object. |
| 1017 | """ |
| 1018 | from django.contrib.admin.models import ADDITION, LogEntry |
| 1019 | |
| 1020 | return LogEntry.objects.log_actions( |
| 1021 | user_id=request.user.pk, |
| 1022 | queryset=[obj], |
| 1023 | action_flag=ADDITION, |
| 1024 | change_message=message, |
| 1025 | single_object=True, |
| 1026 | ) |
| 1027 | |
| 1028 | def log_change(self, request, obj, message): |
| 1029 | """ |
no test coverage detected