English 中文(简体)
招待费
原标题:Guestbook application

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 %}
问题回答

你的作者财产并不是一种扼杀,因此我不认为你可以做些什么。

问候。 提交人: mike

我感到惊讶的是,你会发现一个错误,告诉你,尽管如此,而不是把他们送回!

你试图根据另一个实体的财产进行过滤,这需要加入。 这在上诉引擎中得到了支持。





相关问题
How to make logging.debug work on Appengine?

I m having a tough time getting the logging on Appengine working. the statement import logging is flagged as an unrecognized import in my PyDev Appengine project. I suspected that this was just an ...

gqlQuery returns object, want list of keys

Is there a way to convert the GqlQuery object to an array of keys, or is there a way to force the query to return an array of keys? For example: items = db.GqlQuery("SELECT __key__ FROM Items") ...

Integrating Google AppEngine with a Thick Client

I want to make a multi-user client-server solution with Java Swing thick client as a front-end and Google AppEngine (Java one) as a back-end. The problem is that GAE provides only web-based forms for ...

sorl.thumbnail : thumbnail is not a valid tag library?

I am trying to install sorl.thumbnail but am getting the following error message: thumbnail is not a valid tag library: Could not load template library from django.templatetags.thumbnail, No module ...

热门标签