错误原因:
E:\My_Blog-master>python manage.py runserver
Performing system checks...#执行系统检查
System check identified some issues:#系统检查确认出了一些问题 issues:问题
WARNINGS:
?: (1_8.W001) The standalone(独立) TEMPLATE_* settings were deprecated(弃用) in Django 1.8 and the TEMPLATES dictionary takes precedence(take predence 取得优先权利). You must put the values of the following settings into your default TEMPLATES dict: TEMPLATE_
DEBUG, TEMPLATE_LOADERS.
解决措施:
TEMPLATES = [
{
'BACKEND': 'django.template.backends.django.DjangoTemplates',
'DIRS': [],
'APP_DIRS': True,
'OPTIONS': {
'context_processors': [
'django.template.context_processors.debug',
'django.template.context_processors.request',
'django.contrib.auth.context_processors.auth',
'django.contrib.messages.context_processors.messages',
],
'debug': DEBUG,#在settings.py 中把以TEMPLATE_开头的设置信息,全都加到一个TEMPLATES中。因为到户都是Template相关的设置,那为什么不把他们都放在一起呢??
},
},
]