From 182c3f69a6519c5fdd160a94f44aeca8bc4525d8 Mon Sep 17 00:00:00 2001 From: Jan-Jelle Kester Date: Wed, 27 Jul 2016 18:24:04 +0200 Subject: [PATCH] Add management command for deleting all log entries Issue #57 --- docs/source/usage.rst | 14 ++++++++++++++ 1 file changed, 14 insertions(+) diff --git a/docs/source/usage.rst b/docs/source/usage.rst index 126c5d0..1d06658 100644 --- a/docs/source/usage.rst +++ b/docs/source/usage.rst @@ -121,3 +121,17 @@ related objects:: obj = MyModel.objects.first() rel_history = LogEntry.objects.get_for_objects(obj.related.all()) full_history = (obj.history.all() | rel_history.all()).order_by('-timestamp') + +Management commands +------------------- + +.. versionadded:: 0.4.0 + +Auditlog provides the ``auditlogflush`` management command to clear all log entries from the database. + +The command asks for confirmation, it is not possible to execute the command without giving any form of (simulated) user +input. + +.. warning:: + + Using the ``auditlogflush`` command deletes all log entries permanently and irreversibly from the database.