【发布时间】:2021-07-21 09:39:51
【问题描述】:
在 django3.2 中,我试图将其用于定位和加载模板? 但不适用于我
TEMPLATES = [
{
'BACKEND': 'django.template.backends.django.DjangoTemplates',
'DIRS': ` [BASE_DIR / 'templates']`,
}
默认设置是这样的:
`from pathlib import Path`
# Build paths inside the project like this: BASE_DIR / 'subdir'.
BASE_DIR = Path(__file__).resolve().parent.parent
任何线索可能是什么问题?
【问题讨论】:
标签: python django templates helper django-3.2