Django shell run configuration


I have several scripts in my Django app so I wanted to automate running the shell for a particular creating a new run configuration, so it ran passing the shell option.

I activated  the "Show command line afterwards" option to, well, show the command line after running the script. And also because it has a nice color scheme and autocomplete options. However after running it the following "bad" things happen:

1) the command line shows even before the Python Console has finished starting.

2) it only executes the first command and it does not output anything, i.e. if I enter 2+3 it doesn't show 5 but a newline.

3) it is impossible trying to execute a second command, as the following warning shows up: "Previous command is still running. Please wait or press Ctrl+C in console to interrupt".

So what should I do?


Bonus question: I'd like to execute a couple of lines after starting up that script, mainly to import some recurrent modules. How could I do that from the run configuration?

Comment actions Permalink
Official comment


PyCharm does not support based run configuration (see, but even if you run your command using Django console (Tools |  Run command) you may face troubles with your custom console. If that is your case, please create feature request in


Please sign in to leave a comment.