Skip to content

Instantly share code, notes, and snippets.

@ozkansen
Forked from lorne-luo/python_console_for_pycharm.py
Last active March 12, 2019 20:50
Show Gist options
  • Save ozkansen/43782ec57f7e9c3f44f45bc7485fb282 to your computer and use it in GitHub Desktop.
Save ozkansen/43782ec57f7e9c3f44f45bc7485fb282 to your computer and use it in GitHub Desktop.
django_extensions' shell_plus for Pycharm's python console
# Note : settings.py define in DEBUG_EXTENSIONS true
# add Pycharm -> Settings -> Django Console
# Shell Plus
try:
from django.conf import settings
from pprint import pprint
from django.core.management.color import no_style
if settings.DEBUG_EXTENSIONS:
from django_extensions.management.shells import import_objects
globals().update(import_objects({"dont_load": [], "quiet_load": False}, no_style()))
except:
print("Shell Plus yüklenirken hata oldu")
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment