Skip to content
Projects
Groups
Snippets
Help
This project
Loading...
Sign in / Register
Toggle navigation
E
edx-analytics-data-api
Overview
Overview
Details
Activity
Cycle Analytics
Repository
Repository
Files
Commits
Branches
Tags
Contributors
Graph
Compare
Charts
Issues
0
Issues
0
List
Board
Labels
Milestones
Merge Requests
0
Merge Requests
0
CI / CD
CI / CD
Pipelines
Jobs
Schedules
Charts
Wiki
Wiki
Snippets
Snippets
Members
Members
Collapse sidebar
Close sidebar
Activity
Graph
Charts
Create a new issue
Jobs
Commits
Issue Boards
Open sidebar
edx
edx-analytics-data-api
Commits
2d590a10
Commit
2d590a10
authored
Jun 25, 2014
by
John Jarvis
Browse files
Options
Browse Files
Download
Plain Diff
Merge pull request #4 from edx/jarv/override-from-env
Jarv/override from env
parents
fd1cbc1e
b7f75962
Show whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
12 additions
and
0 deletions
+12
-0
analyticsdataserver/settings/production.py
+12
-0
No files found.
analyticsdataserver/settings/production.py
View file @
2d590a10
...
@@ -32,3 +32,15 @@ with open(CONFIG_FILE) as f:
...
@@ -32,3 +32,15 @@ with open(CONFIG_FILE) as f:
config_from_yaml
=
yaml
.
load
(
f
)
config_from_yaml
=
yaml
.
load
(
f
)
vars
()
.
update
(
config_from_yaml
)
vars
()
.
update
(
config_from_yaml
)
DB_OVERRIDES
=
dict
(
PASSWORD
=
environ
.
get
(
'DB_MIGRATION_PASS'
,
DATABASES
[
'default'
][
'PASSWORD'
]),
ENGINE
=
environ
.
get
(
'DB_MIGRATION_ENGINE'
,
DATABASES
[
'default'
][
'ENGINE'
]),
USER
=
environ
.
get
(
'DB_MIGRATION_USER'
,
DATABASES
[
'default'
][
'USER'
]),
NAME
=
environ
.
get
(
'DB_MIGRATION_NAME'
,
DATABASES
[
'default'
][
'NAME'
]),
HOST
=
environ
.
get
(
'DB_MIGRATION_HOST'
,
DATABASES
[
'default'
][
'HOST'
]),
PORT
=
environ
.
get
(
'DB_MIGRATION_PORT'
,
DATABASES
[
'default'
][
'PORT'
]),
)
for
override
,
value
in
DB_OVERRIDES
.
iteritems
():
DATABASES
[
'default'
][
override
]
=
value
Write
Preview
Markdown
is supported
0%
Try again
or
attach a new file
Attach a 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