静态文件"debug_toolbar/css/print.css"启动Kiwi Tcms时不存在 [英] Static file "debug_toolbar/css/print.css" does not exist when starting Kiwi Tcms

查看:125
本文介绍了静态文件"debug_toolbar/css/print.css"启动Kiwi Tcms时不存在的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

我试图在我的PC,Windows 10上运行Kiwi TCMS,并出现错误:/accounts/login/中的异常静态文件"debug_toolbar/css/print.css"不存在,将导致404错误!我不知道出了什么问题,已经从stackoverflow中搜索并尝试了解决方案(我认为是相关的),但对我没有任何帮助.

我想分享的一件事是,kereberos在Windows中出现问题,因此我安装了winkerberos.我通过将kerberos的 tcms-api 的install_requires更改为winkerberos.它已安装,其他所有东西也都安装了.这有什么问题吗?我是否必须代表kerberos更改或配置winkerberos?

屏幕截图已附上.

截图1 截图2

解决方案

您遇到的错误与 tcms.tests.storage.RaiseWhenFileNotFound 存储的(现在已纠正,以前的)行为有关.课.

在测试和开发过程中使用此存储类(在 tcms/settings/devel.py 中进行设置)来发现丢失的静态文件,以便KiwiTCMS开发人员在发现混乱时可以得到早期警告.

在您遇到错误时,此存储类在Windows上无法正常运行,因为在发现文件中Windows上的路径分隔符为 \\ 时未将其考虑在内./p>

因此,尽管它很好地在Windows上发现了静态文件,却再也找不到与Django模板中指定的文件相匹配的内容了.模板中的静态文件是用熟悉的/作为路径分隔符指定的.

那是那时.

现在是另一回事了.上述存储类已经过重写,可以在Windows上正常工作,因此您不应不再遇到这个错误.

I'm trying to run Kiwi TCMS on my pc, windows 10, and getting error : Exception at /accounts/login/ Static file "debug_toolbar/css/print.css" does not exist and will cause 404 errors! I don't know what's wrong, already searched and tried the solutions from stackoverflow (that I found relevant) but nothing worked for me.

There one thing I want to share, that kereberos was making problems in windows so I installed winkerberos. I did this by changing install_requires of tcms-api , kerberos to winkerberos. It was installed, and everything else was too. Does this make any problem? Do I have to change or configure something for winkerberos on behalf of kerberos?

Screenshots are attached.

Screenshot1 Screenshot2

解决方案

The bug you hit has to do with the (now rectified, former) behavior of the tcms.tests.storage.RaiseWhenFileNotFound storage class.

This storage class is used during testing and development (set in tcms/settings/devel.py) to discover missing static files so that KiwiTCMS developers can get an early warning if they mess something up.

At the time you encountered the bug, this storage class wasn't working well on Windows because it didn't take into consideration when discovering files that the path separator on Windows is \\.

So, while it discovered the static files on Windows alright, it could never find a match for them against what was specified in the Django templates — the static files in the templates were specified with the familiar / as path separators.

But that was then.

It's a different story now. The aforementioned storage class has been rewritten to work well on Windows, and so you should not be hitting this bug any longer.

这篇关于静态文件"debug_toolbar/css/print.css"启动Kiwi Tcms时不存在的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆