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

Popular posts from this blog

css - Which browser returns the correct result for getBoundingClientRect of an SVG element? -

gcc - Calling fftR4() in c from assembly -

.htaccess - Matching full URL in RewriteCond -