Search code examples
pythonpython-3.xdjangodjango-adminreset

How to clear Recent Actions panel on Django Admin?


How would I go about clearing or re-setting the "Recent Actions" Panel in the Django Admin?

I want the admin interface to look like a fresh install.


Solution

  • The "Recent Actions" panel in Django Admin displays LogEntry models. To clear it you would just delete all the objects:

    from django.contrib.admin.models import LogEntry
    
    LogEntry.objects.all().delete()