Using python IRB generates this error “ImportError settings cannot be imported because environment variable %s is undefined”

This is being caused because "Unfortunately, the tagging module’s __init__.py file globally imports some models which rely on the rest of Django’s infrastructure to be up and running (hence the need for settings)."

  • Option 1: launch the python IRB by using "python manage.py shell"
  • Option 2: in python IRB enter "from django.conf import settings; settings.configure()"

http://goo.gl/YtZJ

Advertisements

Leave a Reply

Fill in your details below or click an icon to log in:

WordPress.com Logo

You are commenting using your WordPress.com account. Log Out / Change )

Twitter picture

You are commenting using your Twitter account. Log Out / Change )

Facebook photo

You are commenting using your Facebook account. Log Out / Change )

Google+ photo

You are commenting using your Google+ account. Log Out / Change )

Connecting to %s