Created
September 15, 2011 18:08
-
-
Save itmustbejj/1220002 to your computer and use it in GitHub Desktop.
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
def load_django_models(): | |
try: | |
from django.db.models.loading import get_models | |
for m in get_models(): | |
ip.ex("from %s import %s" % (m.__module__, m.__name__)) | |
except ImportError: | |
print "INFO: could not find a django env" |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment