Skip to content
GitLab
Projects
Groups
Snippets
/
Help
Help
Support
Community forum
Keyboard shortcuts
?
Submit feedback
Contribute to GitLab
Sign in
Toggle navigation
Menu
Open sidebar
Porkepix
memopol
Commits
1d528f32
Commit
1d528f32
authored
Oct 16, 2016
by
Jamesie Pic
Browse files
Restore basic environment variable settings
parent
0a22f9a0
Changes
1
Hide whitespace changes
Inline
Side-by-side
src/memopol/settings.py
View file @
1d528f32
...
...
@@ -21,7 +21,10 @@ from django.utils.crypto import get_random_string
#
BASE_DIR
=
os
.
path
.
dirname
(
os
.
path
.
abspath
(
__file__
))
DEBUG
=
os
.
environ
.
get
(
'DJANGO_DEBUG'
,
'false'
).
lower
()
==
'true'
DEBUG
=
os
.
getenv
(
'DJANGO_DEBUG'
,
False
)
if
hasattr
(
DEBUG
,
'lower'
)
and
DEBUG
.
lower
()
in
(
'false'
,
'0'
,
'none'
):
DEBUG
=
False
# Support none-ish values
#
# Main Django config
...
...
@@ -226,11 +229,11 @@ PUBLIC_DIR = 'wsgi/static'
DATABASES
=
{
'default'
:
{
'NAME'
:
'memopol'
,
'USER'
:
'memopol'
,
'PASSWORD'
:
'memopol'
,
'HOST'
:
'localhost'
,
'PORT'
:
'5432'
,
'NAME'
:
os
.
getenv
(
'DB_NAME'
,
'memopol'
)
,
'USER'
:
os
.
getenv
(
'DB_USER'
,
'memopol'
)
,
'PASSWORD'
:
os
.
getenv
(
'DB_PASSWORD'
,
'memopol'
)
,
'HOST'
:
os
.
getenv
(
'DB_HOST'
,
'localhost'
)
,
'PORT'
:
os
.
getenv
(
'DB_PORT'
,
'5432'
)
,
'ENGINE'
:
'django.db.backends.postgresql_psycopg2'
,
}
}
...
...
Write
Preview
Supports
Markdown
0%
Try again
or
attach a new file
.
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment