If I use command ssh -f server 'cp /file1 /file2 & >/dev/null 2>/dev/null ; disown;' it detaches well and command is runned in the background. But is there any variant of -f key for paramiko?
You have to create new thread/process, for example using Python threading module. Paramiko has to write to socket after finishing Django request.
python-paramiko - run command in background