Created
August 14, 2013 13:19
-
-
Save iorlas/6230945 to your computer and use it in GitHub Desktop.
Django shell iPython. Import all models
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
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