title: Runtime error:App registry isn't ready yet
body: <p>I am trying to create a script that populates a database with test users. I am new to Django and Python. I keep on getting:</p>
  
  <pre><code>Runtime error: App registry isn't ready yet. 
  </code></pre>
  
  <p>Here is the output and error:</p>
  
  <pre><code>starting population script
  Traceback (most recent call last):
  File "populate.py", line 32, in &lt;module&gt;
  populate()
  File "populate.py", line 22, in populate
  i.save()
  File "c:\Python27\lib\site-packages\django-1.7a2-py2.7.egg\django\db\models\base.py",    line 603, in save
  force_update=force_update, update_fields=update_fields)
  ...
  ...
  ...    
  File "c:\Python27\lib\site-packages\django-1.7a2-py2.7.egg\django\apps\registry.py", line   156, in get_models
  self.check_ready()
  File "c:\Python27\lib\site-packages\django-1.7a2-py2.7.egg\django\apps\registry.py",   line 119, in check_ready
  raise RuntimeError("App registry isn't ready yet.")
  RuntimeError: App registry isn't ready yet.
  </code></pre>
  
  <p>Here is the code:</p>
  
  <pre><code>import os
  import datetime
  
  def populate():
      freer = User.objects.create_user( 'joyyie', 'lolcats@gmail.com', 'e')
      cat = User.objects.create_user( 'steve', 'l2olcats@gmail.com', 'e')
      dog = User.objects.create_user( 'aasd', 'lo3lcats@gmail.com', 'ad')
      cow = User.objects.create_user( 'sadsfa', 'lol4cats@gmail.com', 't' )
      pig = User.objects.create_user( 'regibald', 'lolc5ats@gmail.com', '0')
      donkey = User.objects.create_user( 'turnip', 'lolca6ts@gmail.com', 'pop')
      human = User.objects.create_user( 'tutu', 'lolcat7s@gmail.com', 'pa')
      a = [freer,cat,dog,cow,pig,donkey,human]
  
      for i in a:
          i.first_name= 'jackee'
          i.is_superuser=True
          i.is_staff=False
          i.date_joined=datetime.datetime.today()
          i.last_login=datetime.datetime.today()
  
          i.save()
  
  
  if __name__=='__main__':
      print "starting population script"
      os.environ.setdefault('DJANGO_SETTINGS_MODULE', 'infosmos.settings')
      from django.conf import settings
      from django.db import models
      from django.contrib.auth.models import User
      populate()
  </code></pre>
  
  <p>Is there a way to force the user profile creation to wait for the registry app by using a <code>signal</code> or something?</p>