Skip to content

Commit

Permalink
Changed DEBUG logic to be True by default
Browse files Browse the repository at this point in the history
  • Loading branch information
n8creator committed Jan 10, 2024
1 parent 84e05e0 commit 6812d95
Show file tree
Hide file tree
Showing 2 changed files with 4 additions and 6 deletions.
2 changes: 0 additions & 2 deletions .env-sample

This file was deleted.

8 changes: 4 additions & 4 deletions task_manager/settings.py
Original file line number Diff line number Diff line change
Expand Up @@ -27,10 +27,10 @@
# See https://docs.djangoproject.com/en/5.0/howto/deployment/checklist/

# SECURITY WARNING: keep the secret key used in production secret!
SECRET_KEY = os.getenv("SECRET_KEY", "secret_key")
SECRET_KEY = os.getenv("SECRET_KEY", "django-insecure-key-0g#f&l$r*$k%qp8jyh_ifkg$x1bst7@7ni^4gd&3th*d2")

# SECURITY WARNING: don't run with debug turned on in production!
DEBUG = os.getenv("DEBUG", "False") == "True"
DEBUG = os.getenv("DEBUG", "True") == "True"

ALLOWED_HOSTS = [
"127.0.0.1",
Expand Down Expand Up @@ -89,15 +89,15 @@
# https://docs.djangoproject.com/en/5.0/ref/settings/#databases

if DEBUG:
# Use SQLite for local development
# Use SQLite for local development if DEBUG is True
DATABASES = {
"default": {
"ENGINE": "django.db.backends.sqlite3",
"NAME": BASE_DIR / "db.sqlite3",
}
}
else:
# Use PostgreSQL for production on Dokku server
# Use PostgreSQL for production on Dokku server if DEBUG is False
DATABASES = {
"default": dj_database_url.config(
default=os.environ.get("DATABASE_URL"),
Expand Down

0 comments on commit 6812d95

Please sign in to comment.