Django找不到自定义模板标记

2024-04-27 04:18:22 发布

您现在位置:Python中文网/ 问答频道 /正文

我在我的应用程序中创建了一个templatetags文件夹,其中有一个活动.py在里面,Django找不到它,即使应用程序在已安装的应用程序中:

''active'' is not a valid tag library: Template library 'active' not found, tried
django.templatetags.'active',website.home.templatetags.'active',
django_extensions.templatetags.'active',django.contrib.flatpages.templatetags.'active',
django.contrib.staticfiles.templatetags.'active',
django.contrib.admin.templatetags.'active'

Tags: djangopy文件夹应用程序istaglibrarynot