DEV Community

Discussion on: Prevent Multiple Sessions for a User in your Django Application

Collapse
 
tlbrea profile image
Anthony Brea • Edited

class OneSessionPerUserMiddleware:

Called only once when the web server starts

def init(self, get_response):
self.get_response = get_response

How do you implement this code? Could you spell out where this code should reside? Which directories, files etc ...?