Django: having trouble setting up app ready() to import signals
<p>I'm hitting the common "Models aren't loaded yet" error that arises from having a separate signals file that is imported into my apps <code>models.py</code>. I found 2 easy guides on how to create an AppConfig and import signals in the ready() function, but I can't get it working. I'm using the top answer <a href="http://stackoverflow.hex1.ru/questions/33165198/apps-arent-loaded-yet-with-signals" rel="nofollow">here</a> as well as <a href="http://chriskief.com/2014/02/28/django-1-7-signals-appconfig/" rel="nofollow">this</a> blog post.</p>

<p>Part of this is likely due to the fact that my entire project has a name, <code>funproj</code>, and the main app where the bulk of the code is located is helpfully called <code>app</code> - I'm using Visual Studio with Python Tools for VS and it generated this structure when I created the project. Here's the hierarchy:</p>

<pre><code>funproj
|--- __init__.py
|--- setttings.py
|--- urls.py
|
|--app
|   |--- __init__.py
|   |--- models.py
|   |--- signals.py
|
|--otherapp
|   |--- __init__.py
|   |--- other stuff
</code></pre>

<p>This is abbreviated, but I've tried putting the required <code>apps.py</code> and relevant  code for <code>__init.py__</code> under both <code>funproj</code> and <code>app</code> but neither method works. This is what I have for each of those:</p>

<p><strong>apps.py</strong></p>

<pre><code>from django.apps import AppConfig

class FunProjAppConfig(AppConfig):
  name = 'app'

  def ready(self):
    from app import signals
</code></pre>

<p><strong>__init.py__ addition</strong></p>

<pre><code>#import signals in the app config
default_app_config = 'app.apps.FunProjAppConfig'
</code></pre>

<p>It makes more sense to me to have this code in <code>app</code> since it contains the signals that need to be loaded, however the examples I've linked aren't clear to me. One mentions the 'app directory' but I'm not sure if that literally means the <code>app</code>, as I think it should, or if they're using app as a synonym for project.</p>

<p>I don't think this is going to be hard to fix, I just can't figure out what I'm doing wrong.</p>

<p>EDIT: This is Python 3.4 with Django 1.8. Traceback below, it's the same error I get when I simply have a <code>signals.py</code> file and an import in `models.py' of those signals.</p>

<pre><code>C:\Python34\lib\importlib\_bootstrap.py:321: RemovedInDjango19Warning: The utili
ties in django.db.models.loading are deprecated in favor of the new application
loading system.
  return f(*args, **kwds)

Traceback (most recent call last):
  File "C:\Users\David\Source\Repos\path\to\projfiles\manage.py", line
17, in &lt;module&gt;
    execute_from_command_line(sys.argv)
  File "C:\Python34\lib\site-packages\django\core\management\__init__.py", line
338, in execute_from_command_line
    utility.execute()
  File "C:\Python34\lib\site-packages\django\core\management\__init__.py", line
312, in execute
    django.setup()
  File "C:\Python34\lib\site-packages\django\__init__.py", line 18, in setup
    apps.populate(settings.INSTALLED_APPS)
  File "C:\Python34\lib\site-packages\django\apps\registry.py", line 108, in pop
ulate
    app_config.import_models(all_models)
  File "C:\Python34\lib\site-packages\django\apps\config.py", line 198, in impor
t_models
    self.models_module = import_module(models_module_name)
  File "C:\Python34\lib\importlib\__init__.py", line 109, in import_module
    return _bootstrap._gcd_import(name[level:], package, level)
  File "&lt;frozen importlib._bootstrap&gt;", line 2254, in _gcd_import
  File "&lt;frozen importlib._bootstrap&gt;", line 2237, in _find_and_load
  File "&lt;frozen importlib._bootstrap&gt;", line 2226, in _find_and_load_unlocked
  File "&lt;frozen importlib._bootstrap&gt;", line 1200, in _load_unlocked
  File "&lt;frozen importlib._bootstrap&gt;", line 1129, in _exec
  File "&lt;frozen importlib._bootstrap&gt;", line 1471, in exec_module
  File "&lt;frozen importlib._bootstrap&gt;", line 321, in _call_with_frames_removed
  File "C:\Users\David\Source\Repos\path\to\projfiles\app\models.py", l
ine 11, in &lt;module&gt;
    from app import signals
  File "C:\Users\David\Source\Repos\path\to\projfiles\app\signals.py",
line 7, in &lt;module&gt;
    @receiver(post_save, sender=get_model('app', 'Game'))
  File "C:\Python34\lib\site-packages\django\apps\registry.py", line 199, in get
_model
    self.check_models_ready()
  File "C:\Python34\lib\site-packages\django\apps\registry.py", line 131, in che
ck_models_ready
    raise AppRegistryNotReady("Models aren't loaded yet.")
django.core.exceptions.AppRegistryNotReady: Models aren't loaded yet.
</code></pre>

<p>EDIT2: I added a <code>print</code> to the <code>ready()</code> function but saw no output. Here are my installed apps:</p>

<pre><code>INSTALLED_APPS = (
    'django.contrib.auth',
    'django.contrib.contenttypes',
    'django.contrib.sessions',
    'django.contrib.sites',
    'django.contrib.messages',
    'django.contrib.staticfiles',
    'kombu.transport.django',
    'accounts',
    'app',
    'scores',
    'rest_framework',
    'rest_framework.authtoken',
    'rest_auth',
    # Uncomment the next line to enable the admin:
     'django.contrib.admin',
    # Uncomment the next line to enable admin documentation:
    # 'django.contrib.admindocs',
)
</code></pre>