__init__.py 文件源码

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

项目:pillar 作者: armadillica 项目源码 文件源码
def get_current_user() -> UserClass:
    """Returns the current user as a UserClass instance.

    Never returns None; returns an AnonymousUser() instance instead.

    This function is intended to be used when pillar.auth.current_user is
    accessed many times in the same scope. Calling this function is then
    more efficient, since it doesn't have to resolve the LocalProxy for
    each access to the returned object.
    """

    from ..api.utils.authentication import current_user

    return current_user()
评论列表
文章目录


问题


面经


文章

微信
公众号

扫码关注公众号