def get_current_user(cls, keys_only=False): current_user = users.get_current_user() if current_user: return cache.memoize_result( '%s.get_current_user(%s,%s)' % (cls.__name__, current_user.user_id(), keys_only), cls.get_by_user_id, current_user.user_id(), keys_only=keys_only) else: return None
def get_current_user(cls,keys_only=False): current_user = users.get_current_user() if current_user: return cache.memoize_result('%s.get_current_user(%s,%s)'%(cls.__name__,current_user.user_id(),keys_only),cls.get_by_user_id,current_user.user_id(),keys_only=keys_only) else: return None
def get_by_user_id(cls,user_id,keys_only=False): return cache.memoize_result('%s.get_by_user_id(%s,%s)'%(cls.__name__,user_id,keys_only),cls.all(keys_only=keys_only).filter('all_user_ids =',user_id).get)
def get_by_user_id(cls, user_id, keys_only=False): return cache.memoize_result( '%s.get_by_user_id(%s,%s)' % (cls.__name__, user_id, keys_only), cls.all(keys_only=keys_only).filter('all_user_ids =', user_id).get)