Redis – Django sessions: react to a session getting deleted by the clearsessions command
I'm building a webshop where we want anonymous users to also be able to add things to their basket. I thought I'd be smart and created a Basket model like this: class Basket(models.Model): owner = models.ForeignKey(settings.AUTH_USER_MODEL, blank=True, null=True, on_delete=models.CASCADE) session…