def save_profile(first_name, last_name, email, password, interests, friends, city, state): p = helper.get_user_profile(email) if p: p.first_name = first_name p.last_name = last_name p.email = email p.password = password p.interests = interests p.friends = friends p.city = city p.state = state else: p = UserProfile(first_name=first_name, last_name=last_name, email=email, password=password, interests=interests, friends=friends, city=city, state=state) p.put()
def get_recent_profiles(): q = UserProfile.query().order(-UserProfile.last_update) return q.fetch(50)
def get_profile_by_first_name(name): q = UserProfile.query(UserProfile.first_name == name) results = q.fetch(1) for profile in results: return profile return None
def get_user_friends(email): q = UserProfile.query(UserProfile.email == email) results = q.fetch(1) for profile in results: return profile.friends
def get_user_check_box_values(email): q = UserProfile.query(UserProfile.email == email) results = q.fetch(1) for profile in results: return profile.check_box_valies
def get_user_interest(email): q = UserProfile.query(UserProfile.email == email) results = q.fetch(1) for profile in results: return profile.interest
def get_user_last_name(email): q = UserProfile.query(UserProfile.email == email) results = q.fetch(1) for profile in results: return profile.last_name