Assuming I have the following:
class Person(db.Model):
name = db.StringProperty()
I would like to print all the names in the html file using the template.
template_values = {'list': Person.all()}
And the template will look like this:
{% for person in list %}
<form>
<p>{{ person.name}} </p>
<button type="button" name="**{{ person.id }}**">Delete!</button>
</form>
{% endfor %}
Ideally, I would like to use person.key or person.id to then delete the entry using the key, but this does not work. Any ideas how I can do this?
source
share