Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Clean old data #252

Open
meska opened this issue Apr 13, 2023 · 1 comment
Open

Clean old data #252

meska opened this issue Apr 13, 2023 · 1 comment

Comments

@meska
Copy link

meska commented Apr 13, 2023

Hello,
is there any setting to keep only the last X months of log or deleting with a query is enough ?

@l2radamanthys
Copy link

Hi
to delete old data I use the following script:

from easyaudit.models import CRUDEvent, LoginEvent, RequestEvent

CRUDEvent.objects.all().delete()
LoginEvent.objects.all().delete()
RequestEvent.objects.all().delete()

You can review the attributes of each model if you want to make a more specific query. easyaudits/models.py

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants