示例#1
0
 def armies(self):
     #from army import Army
     return Army.objects(for_the=self)
示例#2
0
 def army(self):
     #from army import Army
     return Army.objects(origin=self).first()
示例#3
0
 def armies(self, armies=None, select_related=1):
     if not armies:
         from army import Army
         return Army.objects(location=self).select_related(select_related)
     return armies.filter(location=self)
示例#4
0
 def armies(self):
     from army import Army
     return Army.objects(battle=self)
示例#5
0
 def defenders(self):
     from army import Army
     return Army.objects(Q(battle=self) & Q(attitude='defender'))
示例#6
0
 def aggressors(self):
     from army import Army
     return Army.objects(Q(battle=self) & Q(attitude='aggressor'))