48đź‘Ť
âś…
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()
👤pcoronel
5đź‘Ť
You can clear Recent Actions of Django Admin.
First, open Django Shell with this command below:
python manage.py shell
Then, copy & paste these 2 lines of code below to Django Shell then press "Enter". That’s it:
from django.contrib.admin.models import LogEntry
LogEntry.objects.all().delete()
- [Django]-How to filter (or replace) unicode characters that would take more than 3 bytes in UTF-8?
- [Django]-How do I use CSS in Django?
- [Django]-How do I send empty response in Django without templates
0đź‘Ť
Run in command prompt : python manage.py shell
Then type these lines one by one:
from django.contrib.admin.models import LogEntry
LogEntry.objects.all().delete()
and after excuting these lines type this line inside the shell to exit the shell:
exit()
👤Himaloy Mondal
- [Django]-Django TypeError: get() got multiple values for keyword argument 'invoice_id'
- [Django]-HTML Forms without actions
- [Django]-Django: Switching to Jinja2?
Source:stackexchange.com