title: Django app initalization code (like connecting to signals)
body: <p>I need a place to run an initialization code that is application specific (like connecting to signals).
  When I put the code to <code>__init__.py</code> module of an application I've ended up with a circular import of the models.</p>
  
  <p>Is there a way to fire a function when the framework is setup and before any request is executed?</p>
  
  <p>I use quite old version of django 96.6, but I'm also interested in the solutions for the current version.</p>
  
  <p><strong>Regarding the duplication of other questions:</strong>
  Here is how the question differ from the duplicates suggested by S.Lott in comments:</p>
  
  <ul>
  <li><p><a href="https://stackoverflow.com/questions/1797046/correct-place-to-put-extra-startup-code-in-django">Correct place to put extra startup code in django?</a>
  Django need to be fully initialized when the function is ran. So code in manage.py won't work.</p></li>
  <li><p><a href="https://stackoverflow.com/questions/1986060/where-should-i-place-the-one-time-operation-operation-in-the-django-framework">Where should I place the one-time operation operation in the Django framework?</a>
  The function initialize the connection between my applications. So the code must be ran in each thread that will actually handle the requests.</p></li>
  </ul>
  
  <p><strong>Comments to current solutions:</strong>
  I can't use urls as most of my apps don't have any urls exposed. They just listen to signals and store additional information in the database.</p>