[Python] I have a Django model called DataLog that stores API action logs. I need to delete...

Discussão em 'Python' iniciado por Stack, Setembro 1, 2025.

  1. Stack

    Stack Membro Participativo

    What is the best practice in Django to achieve this? Should I use a management command + cron job, django-crontab, or Celery beat for scheduling the deletion? Is there a way to make this automatic without having to call the cleanup manually inside my views?

    I tried using crontab by creating a function to delete the data after 60 days from created_at.

    Continue reading...

Compartilhe esta Página