#xadmin.sites源碼報(bào)錯(cuò)提示部分
def check_dependencies(self):
"""
檢查運(yùn)行xadmin需要的包是否已經(jīng)正確安裝
默認(rèn)情況下會(huì)檢查 *ContentType* 模塊是否已經(jīng)正確安裝
"""
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.")
if not ('django.contrib.auth.context_processors.auth' in settings.TEMPLATE_CONTEXT_PROCESSORS or
'django.core.context_processors.auth' in settings.TEMPLATE_CONTEXT_PROCESSORS):
raise ImproperlyConfigured("Put 'django.contrib.auth.context_processors.auth' "
"in your TEMPLATE_CONTEXT_PROCESSORS setting in order to use the admin application.")