[英]File to import not found or unreadable: bootstrap-sass
Trying out Django Shop. 尝试Django商店。 Following this tutorial: https://django-shop.readthedocs.io/en/stable/tutorial/intro.html (stable).
遵循本教程: https : //django-shop.readthedocs.io/en/stable/tutorial/intro.html (稳定)。
When I run the server and open localhost, here's what I see: 当我运行服务器并打开localhost时,我看到的是:
Error: File to import not found or unreadable: bootstrap-sass/assets/stylesheets/bootstrap/variables.
Parent style sheet: /home/vm/PycharmProjects/Django-shop/django-shop/shop/static/shop/css/_variables.scss
on line 1 of ../shop/static/shop/css/_variables.scss
>> @import "bootstrap-sass/assets/stylesheets/bootstrap/variables";
I presume, this "bootstrap-sass" directory is supposed to be in "css" and I don't see it there. 我想,这个“ bootstrap-sass”目录应该位于“ css”中,但我在那儿看不到它。
Only happens on front of the website. 仅发生在网站前面。 I can open admin panel just fine.
我可以打开管理面板。
The error mentioned in the comment that says No module named 'django.core.urlresolvers'
gives you a clue that there is a django compatibility issue. 注释中提到的错误称
No module named 'django.core.urlresolvers'
您提供了一个django兼容性问题的线索。 To understand more about this error please refer to this answer on Stackoverflow, which discusses a particular changelog from Django 1.x version to 2.x. 要了解更多有关这个错误请参考此答案#2,讨论从Django中的1.x版本到2.x的一个特定的changelog Now that we know that this could be a point of conflict here, refer to Compatibility Table , which clearly states that Django Shop is not compatible with Django 2.x versions as of now and in your project setup when you
pip install django
, it installs the latest version of django which is 2.1. 现在我们知道这可能是一个冲突点,请参阅Compatibility Table ,该表明确指出Django Shop到目前为止与Django 2.x版本不兼容,并且在您的项目设置中通过
pip install django
安装django的最新版本是2.1。 Therefore to overcome this, you should downgrade the Django to a version thats compatible with your Django Shop version. 因此,为了克服这个问题,你应该将Django降级到与你的Django Shop版本兼容的版本。 So a working combination would be Django 1.11 and Django Shop 0.13.x.
因此,有效的组合将是Django 1.11和Django Shop0.13.x。
声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.