__init__.py 文件源码

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

项目:django 作者: alexsukhrin 项目源码 文件源码
def get_user_model():
    """
    Returns the User model that is active in this project.
    """
    try:
        return django_apps.get_model(settings.AUTH_USER_MODEL, require_ready=False)
    except ValueError:
        raise ImproperlyConfigured("AUTH_USER_MODEL must be of the form 'app_label.model_name'")
    except LookupError:
        raise ImproperlyConfigured(
            "AUTH_USER_MODEL refers to model '%s' that has not been installed" % settings.AUTH_USER_MODEL
        )
评论列表
文章目录


问题


面经


文章

微信
公众号

扫码关注公众号