pgcontents/hybridmanager.py
def path_dispatch1(mname, returns_model):
    """
    Decorator for methods that accept path as a first argument.
    """
    def _wrapper(self, *args, **kwargs):
        path, args = _get_arg('path', args, kwargs)
        prefix, mgr, mgr_path = _resolve_path(path, self.managers)
        result = getattr(mgr, mname)(mgr_path, *args, **kwargs)
        if returns_model and prefix:
            return _apply_prefix(prefix, result)
        else:
            return result

    return _wrapper
def path_dispatch1(mname, returns_model):
    def _wrapper(self, *args, **kwargs):
        path, args = _get_arg('path', args, kwargs)
        prefix, mgr, mgr_path = _resolve_path(path, self.managers)
        result = getattr(mgr, mname)(mgr_path, *args, **kwargs)
        if returns_model and prefix:
            return _apply_prefix(prefix, result)
        else:
            return result

    return _wrapper
def path_dispatch1 ( mname , returns_model ) : def _wrapper ( self , * args , * * kwargs ) : path , args = _get_arg ( 'path' , args , kwargs ) prefix , mgr , mgr_path = _resolve_path ( path , self . managers ) result = getattr ( mgr , mname ) ( mgr_path , * args , * * kwargs ) if returns_model and prefix : return _apply_prefix ( prefix , result ) else : return result return _wrapper
Decorator for methods that accept path as a first argument.
Decorator for methods that accept path as a first argument .