简体   繁体   English

Django 问题:第 17 行的块标记无效:“静态”。 您是否忘记注册或加载此标签?

[英]a Django problem: Invalid block tag on line 17: 'static'. Did you forget to register or load this tag?

I am reading ,in 4.2 section I got a bug,but I code exactly as it appears in the book.And I did wrire<% load staticfiles %>.我正在阅读,在 4.2 部分我遇到了一个错误,但我的代码与书中出现的完全一样。而且我确实写了<% load staticfiles %>。 django version 2.1 python version 3.7 this is the file directory index.html django version 2.1 python version 3.7这是文件目录 index.html

this is settings.py这是settings.py

this is also settings.py这也是 settings.py

this is console and it shows that there is a bug这是控制台,它显示有一个错误

this is what browser shows这是浏览器显示的

You are currently using <% load staticfiles %> which is wrong .您当前正在使用<% load staticfiles %>这是错误的

Instead you should use {% load static %}相反,您应该使用{% load static %}

暂无
暂无

声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.

相关问题 第 10 行的块标记无效:'static'/css/all.css''。 您是否忘记注册或加载此标签? - Invalid block tag on line 10: 'static'/css/all.css''. Did you forget to register or load this tag? Django:第 14 行的块标记无效:“endblock”,预期为“endfor”。 您是否忘记注册或加载此标签? - Django: Invalid block tag on line 14: 'endblock', expected 'endfor'. Did you forget to register or load this tag? Django:第14行上的无效块标记:“ else”。 您是否忘记注册或加载此标签? - Django: Invalid block tag on line 14: 'else'. Did you forget to register or load this tag? django 显示错误,例如“第 3 行的块标记无效:“其他”。 您是否忘记注册或加载此标签? - django shows error like 'Invalid block tag on line 3: 'else'. Did you forget to register or load this tag?' 无效的块标记。 您是否忘记注册或加载此标记? - Invalid block tag. Did you forget to register or load this tag? 无效的块标记:&#39;endblock&#39;。 您是否忘记注册或加载此标签? - Invalid block tag: 'endblock'. Did you forget to register or load this tag? 无效的块标记“其他”。 您是否忘记注册或加载此标签? - Invalid block tag 'else'. Did you forget to register or load this tag? 无效的块标记:'endblock'。 您是否忘记注册或加载此标签? - Invalid block tag : 'endblock'. Did you forget to register or load this tag? django模板代码未加载:“ TemplateSyntaxError:第19行“ applink”上的无效块标记。 您是否忘记注册或加载此标签?” - django template code not loading: “TemplateSyntaxError : Invalid block tag on line 19: 'applink'. Did you forget to register or load this tag?” 第 10 行的块标记无效:“endblock”,预期为“empty”或“endfor”。 您是否忘记注册或加载此标签? django(蟒蛇) - Invalid block tag on line 10: 'endblock', expected 'empty' or 'endfor'. Did you forget to register or load this tag? django (python)
 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM