box-o-sand/ares/server/families.py
Dan Buch bfc97737b4 doing some light relation-like stuff
although I spent way too much time on the server side since deciding
to add Redis as "persistence".
2012-05-18 11:18:41 -04:00

13 lines
306 B
Python

from server.resource import Resource
class Families(Resource):
__collection__ = 'families'
__required_keys__ = ('surname',)
def get_by_surname(self, surname):
for family in self.getall():
if family['surname'] == surname:
return family
return None