Added get_campus_by_campusName function
This commit is contained in:
parent
5678fa7a9b
commit
7bb9bb9bfb
1 changed files with 8 additions and 0 deletions
|
@ -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)
|
||||||
|
|
Loading…
Reference in a new issue