awesto / django-shop

A Django based shop system
http://www.django-shop.org
BSD 3-Clause "New" or "Revised" License
3.18k stars 1.04k forks source link

Improperly configured error #750

Closed calvinkcc closed 5 years ago

calvinkcc commented 5 years ago

So I have tried windows, Linux and ever a production server. Every time I tried all the steps and when I try to migrate this error pops up. "raise ImproperlyConfigured("Environment variable DJANGO_SHOP_TUTORIAL is not set") django.core.exceptions.ImproperlyConfigured: Environment variable DJANGO_SHOP_TUTORIAL is not set " I can assure that I have export the DJANGO_SHOP_TUTORIAL as commodity and DJANGO_DEBUG=1 I also checked the env using "env" command and also checked export using "export" command. Both of them displays the env properly. Please send help.

jrief commented 5 years ago

This happens in line 29 of settings.py. If you read the preceding code, you see that this environment variable simply isn't set. I can't tell you anything else.

calvinkcc commented 5 years ago

Jesus, I'm dumb. So we have to set in settings.py "SHOP_TUTORIAL = 'commodity'

and

DEBUG = 1

matching to our environment variable? and also manually? I thought it would be automatically once the environment is set.

mdnur89 commented 5 years ago

@calvinkcc hey man, I'm apparently encountering the same problem as I'm running it for the second time and I want to run another demo the i18n polymorphic. Is it that I must actually edit the settings.py manually inputting the SHOP_TUTORIAL=i18n_polymorphic DEBUG=1. ? Sorry for the inconvenience, I need help.

jrief commented 5 years ago

use environment variables