(admin.E403) A ‘django.template.backends.django.DjangoTemplates’ instance must be configured in TEMPLATES in order to use the admin application.| 使用jinjia2时报错
1 问题分析
(admin.E403) A ‘django.template.backends.django.DjangoTemplates’ instance must be configured in TEMPLATES in order to use the admin application.
解读:(admin.E403)必须在TEMPLATES中配置’django.template.backends.django.DjangoTemplates’实例,才能使用管理应用程序。
言下之意就是您的需要在您django项目下的setting中TEMPLATES增加django模板引擎。
2 解决(linux系统下)
2.1 修改django项目下setting中的TEMPLATES
笔者本机地址为(您可以参考这来寻找):
TEMPLATES = [
{
'BACKEND': 'django.template.backends.jinja2.Jinja2',
'DIRS': [os.path.join(BASE_DIR,'templates'),],
'APP_DIRS&#