django.core.exceptions.AppRegistryNotReady: Apps aren't loaded yet.
解决方法: 用django的TestCase
from django.test import TestCase
or
import django django.setup()
or
In [9]: from django.conf import settings In [10]: settings.configure() In [11]: import django In [12]: django.setup()