checks.py 文件源码

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

项目:django-hijack-admin 作者: arteria 项目源码 文件源码
def check_custom_user_model(app_configs, **kwargs):
    warnings = []
    if (settings.AUTH_USER_MODEL != DEFAULT_AUTH_USER_MODEL and
            not _using_hijack_admin_mixin()):
        warnings.append(
            Warning(
                'django-hijack-admin does not work out the box with a custom user model.',
                hint='Please mix HijackUserAdminMixin into your custom UserAdmin.',
                obj=settings.AUTH_USER_MODEL,
                id='hijack_admin.W001',
            )
        )
    return warnings
评论列表
文章目录


问题


面经


文章

微信
公众号

扫码关注公众号