I have been trying to run this query:
my_post = db.GqlQuery("SELECT * FROM Post where __key__ = KEY('Post', 1)")
self.render("showpost.html", my_post = my_post)
and my template showpost.html
looks like this:
<div class="post">
<h3 class="post-subject">{{ my_post.subject }}</h3>
<div class="post-content">{{ my_post.content }}</div>
</div
Instead of getting the details of the Post of id=1
I'm getting a blank page. Although there exists a post with id=1 i'm not sure how to confirm if the GQLquery is actually returning something. Is there a way to check?
On trying the following:
my_post = db.GqlQuery("SELECT * FROM Post where subject = 'hello_world')
self.render("showpost.html", my_post = my_post)
I get the same issue (blank page), even though there is post who's subject is hello_world
Thanks a lot