Skip to content

Commit

Permalink
Add default values for env
Browse files Browse the repository at this point in the history
  • Loading branch information
n2o committed Aug 22, 2024
1 parent 2923e6c commit ff5705d
Show file tree
Hide file tree
Showing 2 changed files with 10 additions and 10 deletions.
4 changes: 2 additions & 2 deletions .env.example
Original file line number Diff line number Diff line change
Expand Up @@ -9,7 +9,7 @@ DEBUG=True
LOG_LEVEL=DEBUG

AIEDN_API_TOKEN=
AIEDN_API_URL=https://app.aiedn.eu/aiedn-server/api/aiedn
AIEDN_API_URL=

CLOUDINARY_URL=
GOOGLE_APPLICATION_CREDENTIALS=
Expand Down Expand Up @@ -54,4 +54,4 @@ REDIS_SENTINEL_2=
REDIS_SENTINEL_2_PORT=
REDIS_PASSWORD=

COOKIE_NAME=session_dv
COOKIE_NAME=session_dv
16 changes: 8 additions & 8 deletions mathefragen/settings/__init__.py
Original file line number Diff line number Diff line change
Expand Up @@ -137,13 +137,13 @@
WSGI_APPLICATION = 'mathefragen.wsgi.application'

DATABASES = {
'default': {
'ENGINE': 'django.db.backends.postgresql_psycopg2',
'NAME': env('DB_NAME'),
'USER': env('DB_USER'),
'PASSWORD': env('DB_PWD'),
'HOST': env('DB_HOST'),
'PORT': env('DB_PORT')
"default": {
"ENGINE": "django.db.backends.postgresql_psycopg2",
"NAME": env("DB_NAME", "mathefragen"),
"USER": env("DB_USER", "mathefragen"),
"PASSWORD": env("DB_PWD", "mathefragen"),
"HOST": env("DB_HOST", "localhost"),
"PORT": env("DB_PORT", "5432")
}
}

Expand Down Expand Up @@ -225,7 +225,7 @@

# 10 years
SESSION_COOKIE_AGE = 315569520
SESSION_COOKIE_NAME = env('COOKIE_NAME')
SESSION_COOKIE_NAME = env('COOKIE_NAME', 'session_dv')

# push server
ENABLE_WEBSOCKETS = env('ENABLE_WEBSOCKETS', default=False)
Expand Down

0 comments on commit ff5705d

Please sign in to comment.