def getRestaurantsInProfile(self): r = {} p = UserProfileModel() current_profile = p.get_by_key_name(users.get_current_user().user_id()) restaurant = RestaurantModel.gql("WHERE profiles = :1", current_profile.key()) for x in restaurant: r[x.key().id()] = x.name return r
def getRestaurantName(self): r = {} p = UserProfileModel() current_profile = p.get_by_key_name(users.get_current_user().user_id()) restaurant = RestaurantModel.gql('WHERE profiles = :1', current_profile.key()) for x in restaurant: r[x.key().id()] = x.name return sorted(r.iteritems())