美文网首页
django.template.exceptions.Templ

django.template.exceptions.Templ

作者: Joncc | 来源:发表于2020-12-28 09:18 被阅读0次

ROOT_URLCONF = ''

TEMPLATES = [
{
'BACKEND': 'django.template.backends.django.DjangoTemplates',
'DIRS': [os.path.join(BASE_DIR, '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',

        ],
        # 添加此部分应解决此问题。
        'libraries': { # Adding this section should work around the issue.
            'staticfiles' : 'django.templatetags.static',
        },
    },
},

]

相关文章

网友评论

      本文标题:django.template.exceptions.Templ

      本文链接:https://www.haomeiwen.com/subject/xhrznktx.html