RuntimeError: App registry isn't ready yet
The upcoming Django 1.7 has many interesting and welcomed changes. One of them is an update to how applications are loaded.
The relase notes also mention potential problems with these changes. I ran into RuntimeError: App registry isn't ready yet while using the self-contained tests approach, but the fix is as simple as mentioned in the relase notes.
import django django.setup()
If your code needs to run on Django < 1.7 as well you could use
# Django 1.7 try: import django django.setup() except AttributeError: pass
Update: Dieter's comment actually made me think about my code for a second and I'll be using something different:
import django if hasattr(django, 'setup'): django.setup()