-
-
Save ozkansen/43782ec57f7e9c3f44f45bc7485fb282 to your computer and use it in GitHub Desktop.
django_extensions' shell_plus for Pycharm's python 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 : 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