ajax.py 文件源码

python
阅读 22 收藏 0 点赞 0 评论 0

项目:aiohttp-three-template 作者: RobertoPrevato 项目源码 文件源码
def ajax(f):
    """
    Enforces the use of AJAX requests to access a resource. (Raises HTTPNotFound otherwise)
    """
    @wraps(f)
    async def wrapped(request):
        if not is_ajax(request):
            raise HTTPNotFound()

        return await f(request)
    return wrapped
评论列表
文章目录


问题


面经


文章

微信
公众号

扫码关注公众号