出现如下警告:
WARNINGS:
?: (1_8.W001) The standalone TEMPLATE_* settings were deprecated in Django 1.8 and the TEMPLATES dictionary takes precedence. You must put the values of the following settings into your default TEMPLATES dict: TEMPLATE_DIRS.
解决方法:在setting.py中将TEMPLATE_DIRS取消,并写入前面的配置中即可,如下
TEMPLATES = [
{
'BACKEND': 'django.template.backends.django.DjangoTemplates',
'DIRS': [os.path.join(BASE_DIR, 'templates'),],
'APP_DIRS': True,
...
#TEMPLATE_DIRS = (os.path.join(BASE_DIR, 'templates'),)