0

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.

Lev Slinsen
  • 369
  • 1
  • 4
  • 21
  • Can you try this `python manage.py collectstatic` and then see if the error goes away. It looks like the static files related to Django Shop are not present in static folder. – Paandittya Mar 18 '19 at 05:35
  • @Paandittya This is weird. It says ```No module named 'django.core.urlresolvers' ```. Reinstalling Django didn't help – Lev Slinsen Mar 18 '19 at 05:45
  • Ok. Now this sounds like you are using a version of Django Shop which is not compatible with your Django version. Could you take a look at [Compatibility Table](https://django-shop.readthedocs.io/en/stable/#django-python-compatibility-table) from docs of Django Shop and confirm that there is no conflict in your setup? – Paandittya Mar 18 '19 at 06:04
  • @Paandittya You're right. I'm using the Django version 2.1.7. Downgraded it to 1.11 and now it works just fine. Thank you =) Are you going to write an answer below? Or should I answer my own question? – Lev Slinsen Mar 18 '19 at 06:29
  • Added as the answer. Happy coding :) – Paandittya Mar 18 '19 at 06:45

1 Answers1

0

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.

Paandittya
  • 885
  • 8
  • 17