Last active
September 28, 2017 16:23
-
-
Save viruthagiri/3012f4c7a09102b51112 to your computer and use it in GitHub Desktop.
Auto import Django models into Pycharm Console
This file contains hidden or 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
| #Pycharm settings -> Project settings -> Console -> Django console | |
| from django.db.models.loading import get_models | |
| for m in get_models(): | |
| exec "from %s import %s" % (m.__module__, m.__name__) |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment