Skip to content

Commit

Permalink
Merge pull request #17 from nens/reinout-settings3
Browse files Browse the repository at this point in the history
Added ALLOWED_HOSTS
  • Loading branch information
reinout authored Apr 3, 2024
2 parents 7816572 + 6baaf23 commit bb098ef
Showing 1 changed file with 12 additions and 6 deletions.
18 changes: 12 additions & 6 deletions brostar_api/settings.py
Original file line number Diff line number Diff line change
Expand Up @@ -30,6 +30,8 @@


ALLOWED_HOSTS = []
if not DEBUG:
ALLOWED_HOSTS = [".brostar.nl"]

CSRF_TRUSTED_ORIGINS = [
"http://localhost:4200",
Expand Down Expand Up @@ -96,20 +98,24 @@

LOGGING = {
"version": 1,
"disable_existing_loggers": False,
"disable_existing_loggers": True,
"handlers": {
"file": {
"console": {
"level": "DEBUG",
"class": "logging.FileHandler",
"filename": os.path.join(BASE_DIR, "django_log.log"),
"class": "logging.StreamHandler",
},
},
"loggers": {
"": {
"handlers": ["file"],
"level": "DEBUG",
"handlers": ["console"],
"level": "DEBUG" if DEBUG else "INFO",
"propagate": True,
},
"django": {
"handlers": ["console"],
"level": "INFO", # DEBUG level would also print sql statements
"propagate": False,
},
},
}

Expand Down

0 comments on commit bb098ef

Please sign in to comment.