Skip to content

Commit

Permalink
fix: Change DEBUG=True by default to DEBUG=False (#757)
Browse files Browse the repository at this point in the history
* fix: Change `DEBUG=True`  by default to `DEBUG=False`

Signed-off-by: Guilhem Barthés <guilhem.barthes@owkin.com>

* docs: changelog

Signed-off-by: Guilhem Barthés <guilhem.barthes@owkin.com>

---------

Signed-off-by: Guilhem Barthés <guilhem.barthes@owkin.com>
  • Loading branch information
guilhem-barthes committed Oct 9, 2023
1 parent e17b395 commit edfb991
Show file tree
Hide file tree
Showing 6 changed files with 11 additions and 4 deletions.
4 changes: 4 additions & 0 deletions CHANGELOG.md
Original file line number Diff line number Diff line change
Expand Up @@ -17,6 +17,10 @@ and this project adheres to [Semantic Versioning](https://semver.org/spec/v2.0.0

- Pre-populate Skaffold deployment with substra-tools base docker image (not minimal) ([#736](https://github.com/Substra/substra-backend/pull/736))

### Fixed

- `settings.DEBUG` is not `True` by default.

## [0.42.0](https://github.com/Substra/substra-backend/releases/tag/0.42.0) 2023-09-08

## Changed
Expand Down
3 changes: 1 addition & 2 deletions backend/backend/settings/common.py
Original file line number Diff line number Diff line change
Expand Up @@ -23,8 +23,7 @@
from .deps.path import *
from .deps.utils import to_bool

# SECURITY WARNING: don't run with debug turned on in production!
DEBUG = True
DEBUG = False


SUBPATH = os.environ.get("SUBPATH", "") # prefix for backend endpoints
Expand Down
2 changes: 2 additions & 0 deletions backend/backend/settings/localdev.py
Original file line number Diff line number Diff line change
@@ -1,6 +1,8 @@
from .mods.oidc import *
from .test import *

DEBUG = True

# Enable Browsable API
REST_FRAMEWORK["DEFAULT_RENDERER_CLASSES"] += ("rest_framework.renderers.BrowsableAPIRenderer",)
REST_FRAMEWORK["DEFAULT_AUTHENTICATION_CLASSES"] += [
Expand Down
2 changes: 0 additions & 2 deletions backend/backend/settings/prod.py
Original file line number Diff line number Diff line change
Expand Up @@ -9,8 +9,6 @@
from .mods.cors import *
from .mods.oidc import *

DEBUG = False

USE_X_FORWARDED_HOST = True
SECURE_PROXY_SSL_HEADER = ("HTTP_X_FORWARDED_PROTO", "https")
os.environ["HTTPS"] = "on"
Expand Down
2 changes: 2 additions & 0 deletions backend/backend/settings/test.py
Original file line number Diff line number Diff line change
Expand Up @@ -8,6 +8,8 @@

logging.disable(logging.CRITICAL)

DEBUG = True

ORG_NAME = "OrgTestSuite"
DEFAULT_DOMAIN = "http://testserver"
ALLOWED_HOSTS = ["testserver"]
Expand Down
2 changes: 2 additions & 0 deletions backend/backend/settings/worker/events/dev.py
Original file line number Diff line number Diff line change
@@ -1 +1,3 @@
from .common import *

DEBUG = True

0 comments on commit edfb991

Please sign in to comment.