def _is_from_logout(request):
 return getattr(request, 'is_from_logout', False)

def _is_from_logout ( request ) : return getattr ( request , 'is_from_logout' , False )
returns whether the request has come from logout action to see if is_from_logout attribute is present .