自定义模板标签,使用时报以下错误

TemplateSyntaxError at /my_customer_tags/
'admin_tags' is not a registered tag library. Must be one of:
admin_list
admin_modify
admin_static
admin_urls
cache
custom_tags
i18n
kingadmin_tags
l10n
log
static
staticfiles
tz

解决方法:
在proj.settings中做如下设置

TEMPLATES = [
{'BACKEND': 'django.template.backends.django.DjangoTemplates','DIRS': [],'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','app.apptemplates.load_setting',],'libraries':{'my_customer_tags':  'yourapp.templatetags.my_customer_tags',}},
},
]

转载于:https://blog.51cto.com/zhangrf/2107991

is not a registered tag library. Must be one of:相关推荐

  1. 'django_tables2' is not a registered tag library. Must be one of:

    报错来自django-oscar(实验是何敏煌的书第十三章)打开dashboard的某个按钮的时候 TemplateSyntaxError at /dashboard/catalogue/ 'djan ...

  2. django报错‘staticfiles‘ is not a registered tag library

    django在前端模板中使用{% load staticfiles %}会报错,报错信息如下: 'staticfiles' is not a registered tag library. Must ...

  3. TemplateSyntaxError: 'crispy_forms_tags' is not a registered tag library.报错的解决办法

    2019独角兽企业重金招聘Python工程师标准>>> Django项目admin进入后台管理页面时报错: Traceback (most recent call last):Fil ...

  4. django报错is not a registered tag library. Must be one of

    问题 报错500 图是网上找的,我的'staticfiles'是'myfilter' 解决方法 参考博文:https://blog.51cto.com/zhangrf/2107991 在myproje ...

  5. 'staticfiles' is not a registered tag library. Must be one of:

    {% load staticfiles %} 改成 {% load static %}

  6. django.template.exceptions.TemplateSyntaxError: ‘staticfiles‘ is not a registered tag library. Must

    {% load staticfiles %} {% load adminstatic %} 是在 Django 2.1的方法, 在 Django 3.0已经修改了 {% load staticfile ...

  7. Can not find the tag library descriptor for http://www.springframework.org/tags/form 解决方法

    1. 今天在写东西的时候突然遇到这个问题: For Spring 3 the tag library specified in the tag library directive (http://ww ...

  8. Can not find the tag library descriptor for http://java.sun.com/jsp/jstl/

    jsp页面引入外部的标签<%@ taglib uri="http://java.sun.com/jsp/jstl/core" prefix="c"%> ...

  9. manually set focus for tag library

    https:///wiki/display/WEBCUIF/Tag+Library+FAQ#TagLibraryFAQ-HowcanIsetthefocustoanInputfieldorDDLBin ...

  10. No tag datetimepicker defined in tag library imported with prefix s解决

    今天在学习Struts2标签中的datetimepicker出现这样一个exception: No tag "datetimepicker" defined in tag libr ...

最新文章

  1. 2.lombok系列2:lombok注解详解
  2. ubuntu VMware
  3. VC.NET扩展Windows磁盘清理工具的功能
  4. 大佬都在用的桑基图到底怎么做?告诉你个最简单的方法
  5. 视频技术详解:RTMP H5 直播流技术解析
  6. 第三次学JAVA再学不好就吃翔(part59)--冒泡排序选择排序以及二分查找
  7. CISCO ASA 5510 防火墙的配置实例
  8. 【BZOJ4774】修路 [斯坦纳树]
  9. Eclipse如何新建TOMCAT并配置Server Locations和Publishing属性
  10. Codeforces #345 Div.1
  11. android 主题是什么,什么是Android中的AppCompat主题?
  12. 如何用Java实现进度条
  13. Multisim14 安装出错情况说明,以及解决办法
  14. 网易云音乐软件没有视频的版本
  15. 阳振坤:OceanBase 数据库七亿 tpmC 的关键技术
  16. c语言读取无压缩的cbl的源代码,c语言基础算法案例
  17. oracle qq邮箱不能用,QQ邮箱怎么不能用?QQ邮箱崩了官方公告
  18. 如何去掉html中input的边框
  19. 组建WEP加密无线局域网络
  20. 【钢铁侠3】【高清1280版HD-RMVB.英语中字】【2013最新美国票房科幻动作大片】...

热门文章

  1. nosql的base和cap_关系型数据库遵循ACID规则 NoSQL 数据库BASE CAP
  2. iocp端口断开_关于iocp检测客户端异常断线
  3. 我的面试标准:能干活、基础要好、有潜力!
  4. 程序员如何和产品经理优雅的干架
  5. 基于 MVP + Glide + Retrofit + RxJava2.0 + butterknife 的C9MJ TV App
  6. 前大灯是近光灯还是远光灯_夜间上高速使用近光灯?不会开车就别开,否则12分都不够扣!...
  7. 计算机领域男的多大年龄退休,2022年后男性几岁退休 2022退休时间表
  8. mysql if没用_关于MySql中使用IFNULL()函数失效的问题。
  9. html js 跳出框架,现在的web框架为什么把html和js又结合在一起了?
  10. java---键盘输入,写入到本地硬盘的数据