[Django]-Django: run admin command in background and notify html when finished

3👍

You could use the subprocess module (Popen) to execute the management command as a separate process (thus liberating your view from having to wait until the command is done).

The process could set some kind of flag when it’s done. Then you would poll the server for results until they are available, i.e. the flag has been set

The process would also have to be able to communicate results once they’re available.

Leave a comment