Created
November 11, 2009 11:32
-
-
Save lprsd/231878 to your computer and use it in GitHub Desktop.
bpython equivallent of shell_plus
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
try: | |
from django.core.management import setup_environ | |
import settings | |
setup_environ(settings) | |
print 'imported django settings' | |
try: | |
exec_strs = ["from %s.models import *"%apps for apps in settings.INSTALLED_APPS ] | |
for x in exec_strs: | |
try: | |
exec(x) | |
except: | |
print 'Not imported for %s' %x | |
print 'imported django models' | |
except: | |
pass | |
except: | |
pass |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment