Postgresql – How to persist model changes for specific models on transaction rollback in django atomic request
I have a Django project with ATOMIC_REQUESTS=True. When authentication fails I need to store critical data for the login attempt, here is example code: class LoginSerializer(serializers.Serializer): ... def validate(self, data): ... user = authenticate(email=email, password=password) if user is None: failed_login_attempt(email)…