Added get_campus_by_campusName function

This commit is contained in:
Aran Zaiger 2015-06-21 22:19:49 +03:00
parent 5678fa7a9b
commit 7bb9bb9bfb

View file

@ -13,6 +13,14 @@ def get_user_by_token(token):
return u return u
return None return None
def get_campus_by_campusName(campusName):
query = Campus.all()
query.filter("title = ", campusName)
for u in query.run(limit = 1):
return u
return None
def get_campus_by_suffix(suffix): def get_campus_by_suffix(suffix):
query = Campus.all() query = Campus.all()
query.filter("email_ending = ", suffix) query.filter("email_ending = ", suffix)