I have a script that imports a models.py from an app, but it will not import! I don\'t believe I am supposed to manually create an \"export DJANGO...\" environment variable...I\
You need to properly import your settings file. If you don't import the django environment variables first, your import will fail as you've noticed. You need to code something like:
import os # Set the DJANGO_SETTINGS_MODULE environment variable. os.environ['DJANGO_SETTINGS_MODULE'] = "myproject.settings" #do your stuff