Forked from DoonDoony/pycharm_python_console_shell_plus_script.py
Created
March 7, 2022 10:24
-
-
Save WaYdotNET/3884dcbe868aa426fd5641e76ef4559b to your computer and use it in GitHub Desktop.
Using `shell_plus` in pycharm django console
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
# 💡 NOTE: This only works if you are pretend to using `Django Console` feature in Pycharm | |
# Paste codes below into `Build, Execution, Deployment > Console > Django Console > Starting Script` | |
# requirements: `django_extensions`, `IPython` | |
import sys | |
import django | |
from IPython.core.getipython import get_ipython | |
from django_extensions.management.notebook_extension import load_ipython_extension | |
print('Python %s on %s' % (sys.version, sys.platform)) | |
print('Django %s' % django.get_version()) | |
sys.path.extend([WORKING_DIR_AND_PYTHON_PATHS]) | |
if 'setup' in dir(django): | |
django.setup() | |
ipython = get_ipython() | |
load_ipython_extension(ipython) | |
# NOTE: If you don't use the autoreload feature, don't paste the three lines below | |
load_ipython_extension(ipython) | |
ipython.extension_manager.load_extension('autoreload') | |
ipython.magics_manager.registry['AutoreloadMagics'].autoreload('2') |
sallo (risposta direttamente da gmail)
Il giorno ven 22 lug 2022 alle ore 14:23 AmandaAccalai <
***@***.***> ha scritto:
… ***@***.**** commented on this gist.
------------------------------
se non lo sai tu
—
Reply to this email directly, view it on GitHub
<https://gist.github.com/3884dcbe868aa426fd5641e76ef4559b#gistcomment-4241419>,
or unsubscribe
<https://github.com/notifications/unsubscribe-auth/AABQGWV5JKXR4GFMSU2XV4LVVKHFXANCNFSM54LJGNFA>
.
You are receiving this because you authored the thread.Message ID:
<WaYdotNET/pycharm_python_console_shell_plus_script.py/comments/4241419@
github.com>
--
WaYdotNET ... now python/ruby powered !!!!
www.waydotnet.com => personal website/blog/repository
Happy hacking a tutti :D
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
se non lo sai tu