box-o-sand/oldstuff/activeresource-aspen/server/families.py
2015-06-22 13:15:42 -05: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