Skip to content
Projects
Groups
Snippets
Help
This project
Loading...
Sign in / Register
Toggle navigation
E
edx-platform
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-platform
Commits
1e3efadc
Commit
1e3efadc
authored
Jun 17, 2013
by
Renzo Lucioni
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
switch to using environment variables to get key for Segment.io
parent
67bcbe22
Hide whitespace changes
Inline
Side-by-side
Showing
3 changed files
with
23 additions
and
7 deletions
+23
-7
cms/envs/aws.py
+4
-2
cms/envs/common.py
+13
-3
cms/envs/dev.py
+6
-2
No files found.
cms/envs/aws.py
View file @
1e3efadc
...
...
@@ -112,8 +112,10 @@ TIME_ZONE = ENV_TOKENS.get('TIME_ZONE', TIME_ZONE)
for
feature
,
value
in
ENV_TOKENS
.
get
(
'MITX_FEATURES'
,
{})
.
items
():
MITX_FEATURES
[
feature
]
=
value
# load segment.io key, provide a dummy if it does not exist
SEGMENT_IO_KEY
=
ENV_TOKENS
.
get
(
'SEGMENT_IO_KEY'
,
'***REMOVED***'
)
# If Segment.io key specified, load it and turn on Segment.io if the feature flag is set
SEGMENT_IO_KEY
=
AUTH_TOKENS
.
get
(
'SEGMENT_IO_KEY'
)
if
SEGMENT_IO_KEY
:
MITX_FEATURES
[
'SEGMENT_IO'
]
=
ENV_TOKENS
.
get
(
'SEGMENT_IO'
,
False
)
LOGGING
=
get_logger_config
(
LOG_DIR
,
logging_env
=
ENV_TOKENS
[
'LOGGING_ENV'
],
...
...
cms/envs/common.py
View file @
1e3efadc
...
...
@@ -32,13 +32,23 @@ from path import path
MITX_FEATURES
=
{
'USE_DJANGO_PIPELINE'
:
True
,
'GITHUB_PUSH'
:
False
,
'ENABLE_DISCUSSION_SERVICE'
:
False
,
'AUTH_USE_MIT_CERTIFICATES'
:
False
,
'STUB_VIDEO_FOR_TESTING'
:
False
,
# do not display video when running automated acceptance tests
'STAFF_EMAIL'
:
''
,
# email address for staff (eg to request course creation)
# do not display video when running automated acceptance tests
'STUB_VIDEO_FOR_TESTING'
:
False
,
# email address for staff (eg to request course creation)
'STAFF_EMAIL'
:
''
,
'STUDIO_NPS_SURVEY'
:
True
,
'SEGMENT_IO'
:
True
,
# Segment.io - must explicitly turn it on for production
'SEGMENT_IO'
:
False
,
# Enable URL that shows information about the status of various services
'ENABLE_SERVICE_STATUS'
:
False
,
...
...
cms/envs/dev.py
View file @
1e3efadc
...
...
@@ -163,8 +163,12 @@ MITX_FEATURES['STUDIO_NPS_SURVEY'] = False
# Enable URL that shows information about the status of variuous services
MITX_FEATURES
[
'ENABLE_SERVICE_STATUS'
]
=
True
# segment-io key for dev
SEGMENT_IO_KEY
=
'mty8edrrsg'
############################# SEGMENT-IO ##################################
# If there's an environment variable set, grab it and turn on segment io
SEGMENT_IO_KEY
=
os
.
environ
.
get
(
'SEGMENT_IO_KEY'
)
if
SEGMENT_IO_KEY
:
MITX_FEATURES
[
'SEGMENT_IO'
]
=
True
#####################################################################
...
...
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