in my django project I am using python-decouple to read variables from a .env file while I am developing locally. there I use
nore: the file .env is not commited to github.
in CircleCI I am using environment variables. there I set
in my settings.py file I do the following:
... DEBUG = config('DEBUG', default=False, cast=bool) ... if not DEBUG: # this is done only on heroku (where I set the env var to DEBUG=0) "send errors to sentry.io" ...
the result is that I am logging errors in sentry.io while running unit tests on CircleCI. I don’t want to do that…
my impression is that CircleCI interprets
DEBUG=true as a string…
note: I also tried
DEBUG=1, all with the same result.
how do I have to declare environment variable DEBUG to be a boolean?