0
有關於谷歌應用程序引擎的機型如下:谷歌App Engine的蟒蛇過濾器「的財產屬性」
class Choice(db.Model):
poll = db.ReferenceProperty(Poll, collection_name = 'choices')
text = db.StringProperty()
class Vote(db.Model):
choice = db.ReferenceProperty(Choice, collection_name = 'votes')
ip = db.StringProperty()
date = db.DateTimeProperty(auto_now=1)
如何做到這一點Django的查詢?
same_vote = Vote.filter(ip=self.ip, choice__poll=self.choice.poll)