简体   繁体   中英

File to import not found or unreadable: bootstrap-sass

Trying out Django Shop. Following this tutorial: https://django-shop.readthedocs.io/en/stable/tutorial/intro.html (stable).

When I run the server and open localhost, here's what I see:

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.

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. 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. 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. Therefore to overcome this, you should downgrade the Django to a version thats compatible with your Django Shop version. So a working combination would be Django 1.11 and Django Shop 0.13.x.

The technical post webpages of this site follow the CC BY-SA 4.0 protocol. If you need to reprint, please indicate the site URL or the original address.Any question please contact:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM