내가이 쿼리를 실행하려고되었습니다디버깅 GQL 쿼리
my_post = db.GqlQuery("SELECT * FROM Post where __key__ = KEY('Post', 1)")
self.render("showpost.html", my_post = my_post)
내 템플릿 showpost.html
은 다음과 같습니다
id=1
의 게시물의 세부 사항을 얻는
<div class="post">
<h3 class="post-subject">{{ my_post.subject }}</h3>
<div class="post-content">{{ my_post.content }}</div>
</div
빈 페이지가 나타납니다. id = 1 인 게시물이 있지만 GQLquery가 실제로 어떤 것을 반환하는지 확인하는 방법을 모르겠습니다. 확인 방법이 있습니까? 다음과 같은 노력에 :
my_post = db.GqlQuery("SELECT * FROM Post where subject = 'hello_world')
self.render("showpost.html", my_post = my_post)
나는 피사체의 게시물 hello_world
덕분에 많은
팁 주셔서 감사합니다. 대신 이걸 사용하겠습니다. 고마워요 :) – Prakhar