Skip to content

Instantly share code, notes, and snippets.

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