(self)
检查运行xadmin需要的包是否已经正确安装

        默认情况下会检查 *ContentType* 模块是否已经正确安装
检查运行xadmin需要的包是否已经正确安装
检查运行xadmin需要的包是否已经正确安装
def check_dependencies(self):
        """
        检查运行xadmin需要的包是否已经正确安装

        默认情况下会检查 *ContentType* 模块是否已经正确安装
        """
        from django.contrib.contenttypes.models import ContentType

        if not ContentType._meta.installed:
            raise ImproperlyConfigured("Put 'django.contrib.contenttypes' in "
                                       "your INSTALLED_APPS setting in order to use the admin application.")
def check_dependencies ( self ) : from django . contrib . contenttypes . models import ContentType if not ContentType . _meta . installed : raise ImproperlyConfigured ( "Put 'django.contrib.contenttypes' in " "your INSTALLED_APPS setting in order to use the admin application." )