First time here? Check out the FAQ!

Revision history  [back]

WingIDE has problems recognizing variables set with django-environ

Hi all, I use django-environ (https://github.com/joke2k/django-environ) on one of my existing Django projects. I developed it outside wing-ide. When I try to import and set up the project in Wing pro 7.2.6 the "secret" variables set in my django-environ file ".env" (see django-environ docs for more information about it) are not recognized. I get the following error message:

 File "/home/didier/Documents/django-project/venv/lib/python3.8/site-packages/django/conf/__init__.py", line 176, in __init__
  raise ImproperlyConfigured("The SECRET_KEY setting must not be empty.")

django.core.exceptions.ImproperlyConfigured: The SECRET_KEY setting must not be empty.

It seems to me that Wing IDE does not recognize the hidden file and can't read the hidden variables. All that said, when I run the project the "classical" way from the command line it works seamlessly.

I use Python 3.8, Django 2.2 and a virtual environment with venv. It runs on Linux Mint 19.2. Has anybody an idea about it?