title: how to combine django plus gevent the basics?
body: <p>After much searching and googling I am coming back to the well.
  I have Django 1.4 and am looking for a decent <em>working</em> example to figure out getting Django to work with gevent.
  I like the Django framwork but I need it to handle long polling.
  I already have a working server using gevent on it's own that handles long polling requests as well as does image streaming via http at about 10 frames/second. I would like to use all the goodies in Django to provide a framework for this part.</p>
  
  <p>There are many examples out there, but unfortunately none of these seem to work out of the box! It would really help to have a working example to understand how these two things are working together.</p>
  
  <p>Here is what I have found so far and the problems:</p>
  
  <p><a href="http://codysoyland.com/2011/feb/6/evented-django-part-one-socketio-and-gevent/" rel="nofollow noreferrer">http://codysoyland.com/2011/feb/6/evented-django-part-one-socketio-and-gevent/</a>
  problem:
  ImportError: Could not import settings 'webchat.settings' (Is it on sys.path?): No module named webchat.settings</p>
  
  <p><a href="https://github.com/codysoyland/django-socketio-example/blob/master/README.rst" rel="nofollow noreferrer">https://github.com/codysoyland/django-socketio-example/blob/master/README.rst</a>
  Problem: installation fails with permission problem getting gevent
  Tried manually getting it from git hub. The example runs, but generates these errors when the browsers connect.</p>
  
  <p>These are informative but do not provide the basic answer.
  <a href="https://stackoverflow.com/questions/5614274/need-help-understanding-comet-in-python-with-django">Need help understanding Comet in Python (with Django)</a>
  <a href="https://bitbucket.org/denis/gevent/src/tip/examples/webchat/chat/views.py" rel="nofollow noreferrer">https://bitbucket.org/denis/gevent/src/tip/examples/webchat/chat/views.py</a>
  <a href="http://blog.gevent.org/2009/10/10/simpler-long-polling-with-django-and-gevent/" rel="nofollow noreferrer">http://blog.gevent.org/2009/10/10/simpler-long-polling-with-django-and-gevent/</a></p>
  
  <p>What I hope someone can explain (please, pretty please....) is this:
  I have a basic site created using Django 1.4 - the tutorial here <a href="https://docs.djangoproject.com/en/1.4/intro/tutorial01/" rel="nofollow noreferrer">https://docs.djangoproject.com/en/1.4/intro/tutorial01/</a> is excellent.
  So now I need to understand what changes to make in order to use gevent and be able to handle asynchronous events. I am sure it is not difficult - I just need someone who understands it to explain what to do and also what is happening (with things like monkey_patch).</p>
  
  <p>Thanks.</p>