In my Django project, I am working on a simple multiplayer system where I need to update the isCurrentlyActive
value in a user-related model automatically and then log them out. I tried using middleware following a solution from this post, which works well but requires the user to refresh or send a request to trigger the update. For my project, I need the backend to handle the updates without any action required from the user's end.
I have come across solutions like using Celery
and django-auto-logout
, but they seem too complex for what I need. Can anyone suggest a simpler way to achieve this automatic updating and logging out of users?