I had the same exception with Django 1.7rc2. The solution was to add these lines at the beginning of my program:
import django
django.setup()
Update: This is now documented for Django 1.8.
I had the same exception with Django 1.7rc2. The solution was to add these lines at the beginning of my program:
import django
django.setup()
Update: This is now documented for Django 1.8.