I made a very minor mod to the GqlQuery to retrieve only specified records using the where keyword. The output, however, displays all entries from the guestbook db! (I need to filter the data by author)
特邀书5 - 书店法
#greetings = db.GqlQuery("SELECT * FROM Greeting ORDER BY date DESC LIMIT 10")
greetings = db.GqlQuery("SELECT * FROM Greeting where greeting.author= mike ")
指数.html代码:
{% for greeting in greetings %}
{% if greeting.author %}
<b>{{ greeting.author.nickname }}</b> wrote:
{% else %}
An Anonymous person wrote:
{% endif %}
<blockquote>{{ greeting.content|escape }}</blockquote>
{% endfor %}