title: Asyncio with Django
body: <p>I'm trying to use asyncio in my Django post processing like:</p>
  
  <pre><code>query : # a query to my model
  tasks =  []        
  for record in query:
      tasks.append(do_something_with_google_calendar(record))
  
  loop = asyncio.get_event_loop()
  loop.run_until_complete(asyncio.wait(tasks))
  loop.close()
  </code></pre>
  
  <p>But I just get an error while executing:</p>
  
  <pre><code>loop = asyncio.get_event_loop()
  
  RuntimeError: There is no current event loop in thread 'Thread-17'.
  </code></pre>
  
  <p>Any ideas? </p>
  
  <p>Thank you in advance</p>