I'd like to ask you how to print the shell script on Django.

Asked 2 years ago, Updated 2 years ago, 92 views

Hello, I have a question about Django.

Currently, you have run a shell script on the server with subprocess.run on views.py.

Is there a way to print out the progress log of this shell script in real time to html?

django shell-script console

2022-09-21 12:44

1 Answers

I think what you are looking for is check_output(). The result of this method will be the Shell Script Progress Log. You can provide it to the client in an appropriate way. (Whether it's polling or websocket...)


2022-09-21 12:44

If you have any answers or tips


© 2024 OneMinuteCode. All rights reserved.