+
 新版

djiang中遇到'staticfiles' is not a registered tag library. Must be one of: cache i18n l10n static tz

安心海叔 发布于 2018/10/07 15:30
阅读 6K+
收藏 0

win10 django框架开发遇到的问题,请教!

加载中
0
osc_97789585
osc_97789585
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',
            },
        },
    },
]
OSCHINA
登录后可查看更多优质内容
返回顶部
顶部