Feature request. Django Console disconnect
Hi all,
For all its bugginess I really like the new Django Console. I noticed there are two menu buttons. The close window button and the stop button. The stop button is completely pointless b/c when you stop it there is nothing to do but close the window (you can't recover from it), and if you close the window it is stopped. So... Could you change the stop button to be simply a disconnect. Effectively doing this.
from django.db import connections, DEFAULT_DB_ALIAS
connection = connections[DEFAULT_DB_ALIAS]
connection.close()
This way you can keep the session going.
Please sign in to leave a comment.
So why exactly this is useful? Maybe it's better to simply drop the "stop" button?
Maybe it is better to assign 'Stop last command' action to that button? Now it is mapped to Ctrl+C and not
very obvious.
OK - So "Disconnect" is useful because I don't want to type it.. LOL.
Think about the django developers workflow.
But if I have the console open, and I was running and Query "./manage.py reset" or "./manage.py syncdb" will not proceed as there is an open connection. If I had a convienient way to close the connection then I wouldn't loose my queries, I could retry them later as the console is no longer dead.
Thanks for listening!!
Looks like it would be even more useful if PyCharm automatically prompted you to close the connection when you run one of those manage.py tasks from within PyCharm.
Now THAT would be useful! Don't kill kill it - just close the connect. If you kill it then you loose all your history!
http://youtrack.jetbrains.net/issue/PY-5616