问题:django.template.exceptions.TemplateDoesNotExist: /root/situ/automl_formal/object_detection/templates/
解决方案:在settings里面配置新加的模块。例如我加了新的模块object_detection,必须在下面配置新的模块。
TEMPLATES = [
{
'BACKEND': 'django.template.backends.django.DjangoTemplates',
'DIRS': [os.path.join(BASE_DIR, 'templates'),
os.path.join(BASE_DIR, 'transfer_learning/templates'),
os.path.join(BASE_DIR, 'deep_learning/templates'),
os.path.join(BASE_DIR, 'object_detection/templates'),
]
,
'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',
],
},
},
]