How to query the number of elements stored in a db.ListProperty in google app engine -
the entity class defined like:
class item(db.model): list = db.listproperty(db.key)
what's attribute or function return number of elements stored in listproperty, can use like
{{ item.list.... }}
to display in html.
it's list can use len() on it.
total = len(item.list)
or if using jinja on html can use count filter
{{ item.list|count }}
Comments
Post a Comment