I have this two classes:
class Person(db.Model):
person_name = db.StringProperty(required = True)
#gender = db.StringProperty(required = True)
nacionality = db.StringProperty(required = True)
marital_status = db.StringProperty(required = True)
profession = db.StringProperty(required = True)
SSN = db.IntegerProperty(required = True)
driver_license = db.IntegerProperty(required = True)
address = db.PostalAddressProperty(required = True)
class ContractingParty(db.Model):
person = db.ReferenceProperty(Person, required=True, collection_name="party_to_contracts")
contract = db.ReferenceProperty(Contract, required=True)
condition = db.StringProperty()
I want to pass a query of ContractingParty entities to my jinja2 template. Then with a for loop, I want to acess the data I really want, from Person entities. The Contracting Party query is being passed to jinja2 (if I test it, I can see something like this: [<main.ContractingParty object at 0x0492D770>]). But the for loop bellow doesn't working, no information of the for loop is being shown in my brownser. How could I fix it?
{% for party in parties %}
<li> {{party.person.person_name}} </li>
{% endfor %}