django使用swagger自动生成API文档时,报错

解决方法

在settings.py里面配置一下以下代码

'libraries': {
'staticfiles': 'django.templatetags.static',
}

问题:django.template.exceptions.TemplateSyntaxError: 'staticfiles' is not a registered tag library. Must be one of: admin_list admin_modify admin_urls cache i18n l10n log rest_framework static tz的更多相关文章

  1. 访问提示'staticfiles' is not a registered tag library. Must be one of: admin_list admin_modify admin_urls cache i18n l10n log static tz

    解决方法 前端模板中{% load staticfiles %}都修改为{% load static %} 因为在django3.x中这部分做了修改,前者无法识别,只能用后者

  2. django.template.exceptions.TemplateSyntaxError: 'article_tags' is not a registered tag library.

    django.template.exceptions.TemplateSyntaxError: 'article_tags' is not a registered tag library. Must ...

  3. django.template.exceptions.TemplateSyntaxError: 'static' is not a registered tag library. Must be one of:

    在访问web页面时报错,详细日志如下: django.template.exceptions.TemplateSyntaxError: 'staticfiles' is not a registere ...

  4. Django 自定义模板标签 报错django.template.exceptions.TemplateSyntaxError: '####' is not a registered tag library. Must be one of:

    我写代码遇到这个错误,但是发现程序没有写错,好像是程序有缓存,重新运行几次就好了. 自定义模板标签,可以不用写views,url直接通过自定义函数把变量传给模板. 具体实现: 1.在app下新建Pyt ...

  5. django.template.exceptions.TemplateDoesNotExist: rest_framework/api.html

    django.template.exceptions.TemplateDoesNotExist: rest_framework/api.html setting文件中的 INSTALLED_APPS加 ...

  6. django.template.exceptions.TemplateDoesNotExist: login.html 错误处理

    登陆Login界面时候报错 Internal Server Error: /login/ Traceback (most recent call last): File , in inner resp ...

  7. Django 找不到模版报错" django.template.exceptions.TemplateDoesNotExist: index.html"

    解决办法:在setting.py的TEMPLATES‘DIRS'[]加入模版路径 os.path.join(BASE_DIR, 'templates') TEMPLATES = [ { 'BACKEN ...

  8. django.template.exceptions.TemplateDoesNotExist: index.html

    django.template.exceptions.TemplateDoesNotExist: index.html 在网上查了下,setting中 TEMPLATES 的 'DIRS' 需要添加o ...

  9. django.template.exceptions.TemplateDoesNotExist: login.html报错

    前言 在某一次按以前的步骤使用Django    “django.template.exceptions.TemplateDoesNotExist: login.html”错误,在以为是html文件出 ...

  10. django找不到模板的错误处理django.template.exceptions.TemplateDoesNotExist: blog/list.html

    错误提示如下图: 程序出错对于程序员而言是最常见的,一般解决的要点是看清错误提示(读懂英文很重要) 根据错误提示 blog\list.html这个文件不存在,也就是没找到资源 这个时候需要去检查有没有 ...

随机推荐

  1. [转帖]AHCI到NVMe,SSD的关键科技革命

      https://baijiahao.baidu.com/s?id=1718020841628703656&wfr=spider&for=pc HDD和早期SSD大部分使用SATA接 ...

  2. [转帖]Nginx动静分离详解以及配置

    https://developer.aliyun.com/article/885602?spm=a2c6h.24874632.expert-profile.314.7c46cfe9h5DxWK 简介: ...

  3. redis 6源码解析之 ziplist

    ziplist ziplist结构 ziplist的布局如下,所有的字符默认使用小端序保存: +--------+--------+--------+--------+-------+-------+ ...

  4. postman中monitor的使用

    monitor就是一个摸鱼的功能,我们把写好的接口部署到postman的web服务器中, 绑定自己的邮箱,运行结果会发送到自己的邮箱中,不用实时监控,是个非常方便 的功能(不安全) 1.crete a ...

  5. css中也可以使用变量了?

    前言 大家都听说过变量,我们学习的任何语言都有变量的存在. css中是否也存在变量呢? 也许很多小伙伴也是通过less,scss中来使用css变量 其实在css中也是有变量的,今天我们也来学习一下. ...

  6. js遍历树形结构并返回所有的子节点id值

    场景 很多时候我么需要返回返回tree结构下的所有自己节点 很显然这个时候需要遍历了 废话不多说 直接递归遍历 数据结构 var treeData = [{ id: 111, title: " ...

  7. 【JS 逆向百例】如何跟栈调试?某 e 网通 AES 加密分析

    关注微信公众号:K哥爬虫,QQ交流群:808574309,持续分享爬虫进阶.JS/安卓逆向等技术干货! 声明 本文章中所有内容仅供学习交流,抓包内容.敏感网址.数据接口均已做脱敏处理,严禁用于商业用途 ...

  8. golang uuid库介绍

    简介: 在现代软件开发中,全球唯一标识符(UUID)在许多场景中发挥着重要的作用.UUID是一种128位的唯一标识符,它能够保证在全球范围内不重复.在Go语言中,我们可以使用第三方库github.co ...

  9. Rocketmq学习4——Broker消息持久化原理源码浅析

    一丶前言 在<Rocketmq学习3--消息发送原理源码浅析>中,我们学习了消息发送的要点: 本地缓存+rpc 请求namesever + 定时刷新,topic路由信息 负载均衡的选择一个 ...

  10. 从零开始配置 vim(7)——自动命令

    这篇我们来谈论vim一个相当重要的东西--自动命令. 从编程的角度来看,自动命令有点类似于事件响应,或者回调函数之类.当外部发生某些事件的时候,自动执行事先定义好的一组命令. 定义一个自动命令的格式如 ...