title: Can't iterate over GqlQuery object
body: <p>I have a Blog model which contains 4 entities, subject, blog, time_created and day_created. I query all the values and assign it to an object which pass to a jinja2 template. In the template I iterate over the object and print each different entity which results in the display of each blog post.</p>
  
  <p>The model for the data is:</p>
  
  <pre class="lang-py prettyprint-override"><code>class Blog(db.Model):
      subject = db.StringProperty(required = True, multiline = True)
      blog = db.TextProperty(required = True)
      time_created = db.DateTimeProperty(auto_now_add = True)
      day_created = db.DateProperty(auto_now_add = True)
  </code></pre>
  
  <p>And I query all the entries to display as individual posts as such:</p>
  
  <pre class="lang-py prettyprint-override"><code>posts = db.GqlQuery('SELECT * FROM Blog ORDER BY time_created DESC')
  </code></pre>
  
  <p>and I pass these out to the template </p>
  
  <pre class="lang-py prettyprint-override"><code>class Mainpage(BaseHandler):
  def get(self):
      posts = Blog_posts()
      logging.info(posts)
      if posts:
          end_time = time.time() - start_time
          logging.info(end_time)
          logging.info(start_time)
  
      userLogin = self.checkLogin()
      cookieVal = self.read_secure_cookie('user-id')
      if cookieVal:
          u_id = cookieVal.split('|')[0]
          usr_instance = Users.get_by_id(int(u_id))
          if usr_instance:
              name = usr_instance.username
              if userLogin == True and name:
                  self.render("blog.html", posts = posts, userLogin = userLogin, user_name = name, end_time = int(end_time))
                  logging.info("Logged in = " + str(userLogin))               
          else:
              self.render("blog.html", posts = posts, userLogin = userLogin, user_name = "", end_time = int(end_time))        
      else:
          self.render("blog.html", posts = posts, userLogin = userLogin, user_name = "", end_time = int(end_time)) 
  </code></pre>
  
  <p>the function render() is :</p>
  
  <pre class="lang-py prettyprint-override"><code>def render(self, template, **kw):
      self.response.out.write(render_str(template, **kw))
  </code></pre>
  
  <p>I have a main template blogbase.html which I inherit to all other pages and it contains these lines which I use for template inheritance :</p>
  
  <pre class="lang-html prettyprint-override"><code>&lt;div class="content"&gt;
    {% block content %}
    {% endblock %}
  &lt;/div&gt; 
  </code></pre>
  
  <p>and in the html file that displays the main blog page and inherits this is :</p>
  
  <pre class="lang-html prettyprint-override"><code>{% extends "blogbase.html" %}
  
  {% block content %}
  
      {% for post in posts %}        
        &lt;div class="one_post"&gt;          
          &lt;div class="subject_title"&gt;
            &lt;div class="day"&gt;{{post.day_created.strftime("%d %b %Y")}}&lt;/div&gt;
            &lt;a href="/blog/{{post.key().id()}}" target="_blank"&gt;   
              {{post.subject}}
            &lt;/a&gt;
          &lt;/div&gt;
          &lt;div class="post"&gt;
              {{post.blog}}
          &lt;/div&gt;
        &lt;/div&gt;            
      {% endfor %}
      &lt;div class="query"&gt;
        Queried {{end_time}} seconds ago
    &lt;/div&gt;
  {% endblock %}
  </code></pre>
  
  <p>I added a debugging line to see whether the query works and it returns the true with the following :</p>
  
  <pre><code>&lt;google.appengine.ext.db.GqlQuery object at 0x7f99f03cd050&gt;
  </code></pre>
  
  <p>But I am not able to iterate over this object as in the templates, regular html works, but the part between the <code>for</code> loop doesn't render.</p>
  
  <p>Is there something wrong in my query ? Or am I using the templating engine wrong ?</p>