title: 'TopLevelDocumentMetaclass' object is not iterable
body: <p>I am very new to django world and I try to do some example to use it with mongodb. To connect to mongo I am using mongoengine 0.9.0. I am also using virtualenv.</p>
  
  <p>At the moment I have pretty basic stuff, I am able to run the server but when I try to visualize the webpage I get this error:</p>
  
  <pre><code>'TopLevelDocumentMetaclass' object is not iterable.
  </code></pre>
  
  <p>I was checking others entries with similar "object is not iterable" but most of them was with user models of models.py, mine is in the sites.py and for the moment I prefer not to modify it until I know what I am doing :S</p>
  
  <p>Here are my install packages:</p>
  
  <ul>
  <li>Django==1.5.1</li>
  <li>django-shortcuts==1.5</li>
  <li>djangotoolbox==1.8.0</li>
  <li>mongoengine==0.9.0</li>
  <li>pymongo==2.5.2</li>
  </ul>
  
  <p>My models.py looks like this</p>
  
  <pre><code>from mongoengine import *
  from mongoengine import connect
  connect('mydatabase')
  
  class Restaurant(Document):
      name = StringField(max_length=200) 
  </code></pre>
  
  <p>And the only view I have in the views.py file is this one</p>
  
  <pre><code>def admin(request):
      html = "&lt;html&gt;&lt;body&gt;Proyecto de ejemplo&lt;/body&gt;&lt;/html&gt;"
      return HttpResponse(html)
  </code></pre>
  
  <p>If I don't use mongoengine in my Models.py and instead I use models from django.db it works fine, so I assume that the cause of the problem should be using mongoengine.</p>
  
  <p>Does anyone know how to solve this?</p>