title: Django Apps aren't loaded yet: How to import models
body: <p>I have a Django project looking like</p>
  
  <pre><code>&gt; project
      &gt; gui
          &gt; __init__.py
          &gt; models.py
          &gt; views.py
          &gt; ...
      &gt; project
          __init__.py
          ...
  </code></pre>
  
  <p>I am trying to sync the sqllite db in django with some info I periodically query from other sources. So in project.<strong>init</strong>.py I spawn a thread that periodically queries data.
  However, I am having trouble accessing my models from there and update the database, because when I try to import them into <strong>init</strong>.py</p>
  
  <pre><code>from gui.models import GuiModel
  </code></pre>
  
  <p>I get </p>
  
  <pre><code>django.core.exceptions.AppRegistryNotReady: Apps aren't loaded yet.
  </code></pre>
  
  <p>Is there a trick to do that or a different way to create a separate thread?</p>