(appname, permission=None)
return rv
获取依赖的django权限
获取依赖的django权限
获取依赖的django权限
def get_require_perm_names(appname, permission=None):
    """获取依赖的django权限"""
    rv = set()
    perms = (permission_required.get(permission, []) if permission
        else permission_required.keys())
    for perm in perms:
        if perm.find(".") >= 0:
            rv.add(perm)
        else:
            rv.update(get_require_perm_names(appname, perm))
    return rv
def get_require_perm_names ( appname , permission = None ) : rv = set ( ) perms = ( permission_required . get ( permission , [ ] ) if permission else permission_required . keys ( ) ) for perm in perms : if perm . find ( "." ) >= 0 : rv . add ( perm ) else : rv . update ( get_require_perm_names ( appname , perm ) ) return rv