Last active
March 17, 2020 10:03
-
-
Save lorne-luo/a0599713778f1bd9f6424e8e1855cd98 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
# open Pycharm settings->Build,Execution,Deployment->Console->Django Console | |
# 1.add env var: DJANGO_SETTINGS_MODULE -> settings.settings | |
# 2.copy below into Starting script | |
# open preferences->keymap->search `Python Console`->create new shortcut `cmd + 3` | |
from pprint import pprint | |
from django_extensions.management.shells import import_objects | |
from django.core.management.color import no_style | |
from datetime import datetime | |
globals().update(import_objects({"dont_load": [], "quiet_load": False}, no_style())) |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment