Skip to content
Projects
Groups
Snippets
Help
This project
Loading...
Sign in / Register
Toggle navigation
E
edx-notes-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-notes-api
Commits
162bfb5e
Commit
162bfb5e
authored
Dec 12, 2014
by
Oleg Marshev
Committed by
Tim Babych
Dec 17, 2014
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
Merge pull request #6 from oleg/yml-settings
parent
ae7fcd50
Hide whitespace changes
Inline
Side-by-side
Showing
5 changed files
with
43 additions
and
23 deletions
+43
-23
notesserver/settings/common.py
+9
-0
notesserver/settings/dev.py
+3
-11
notesserver/settings/production.py
+0
-5
notesserver/settings/test.py
+3
-7
notesserver/settings/yaml_config.py
+28
-0
No files found.
notesserver/settings/common.py
View file @
162bfb5e
...
@@ -16,6 +16,15 @@ SECRET_KEY = '*^owi*4%!%9=#h@app!l^$jz8(c*q297^)4&4yn^#_m#fq=z#l'
...
@@ -16,6 +16,15 @@ SECRET_KEY = '*^owi*4%!%9=#h@app!l^$jz8(c*q297^)4&4yn^#_m#fq=z#l'
CLIENT_ID
=
'edx-notes-id'
CLIENT_ID
=
'edx-notes-id'
CLIENT_SECRET
=
'edx-notes-secret'
CLIENT_SECRET
=
'edx-notes-secret'
ELASTICSEARCH_URL
=
'http://127.0.0.1:9200'
ELASTICSEARCH_INDEX
=
'edx-notes'
# Number of rows to return by default in result.
RESULTS_DEFAULT_SIZE
=
25
# Max number of rows to return in result.
RESULTS_MAX_SIZE
=
250
ROOT_URLCONF
=
'notesserver.urls'
ROOT_URLCONF
=
'notesserver.urls'
MIDDLEWARE_CLASSES
=
(
MIDDLEWARE_CLASSES
=
(
...
...
notesserver/settings/dev.py
View file @
162bfb5e
...
@@ -4,20 +4,12 @@ from .common import *
...
@@ -4,20 +4,12 @@ from .common import *
DEBUG
=
True
DEBUG
=
True
ELASTICSEARCH_URL
=
'http://127.0.0.1:9200'
ELASTICSEARCH_INDEX
=
'edx-notes-dev'
ELASTICSEARCH_INDEX
=
'edx-notes-dev'
# Overwrite default annotator-store elasticsearch settings.
###############################################################################
es
.
host
=
ELASTICSEARCH_URL
es
.
index
=
ELASTICSEARCH_INDEX
# Number of rows to return by default in result.
RESULTS_DEFAULT_SIZE
=
25
# Max number of rows to return in result.
RESULTS_MAX_SIZE
=
250
# Override default annotator-store elasticsearch settings.
# Override default annotator-store elasticsearch settings.
###############################################################################
es
.
host
=
ELASTICSEARCH_URL
es
.
host
=
ELASTICSEARCH_URL
es
.
index
=
ELASTICSEARCH_INDEX
es
.
index
=
ELASTICSEARCH_INDEX
annotator
.
elasticsearch
.
RESULTS_MAX_SIZE
=
RESULTS_MAX_SIZE
annotator
.
elasticsearch
.
RESULTS_MAX_SIZE
=
RESULTS_MAX_SIZE
###############################################################################
notesserver/settings/production.py
deleted
100644 → 0
View file @
ae7fcd50
from
.common
import
*
DEBUG
=
False
ALLOWED_HOSTS
=
[
'*'
]
notesserver/settings/test.py
View file @
162bfb5e
...
@@ -12,16 +12,12 @@ TEST_RUNNER = 'django_nose.NoseTestSuiteRunner'
...
@@ -12,16 +12,12 @@ TEST_RUNNER = 'django_nose.NoseTestSuiteRunner'
INSTALLED_APPS
+=
(
'django_nose'
,)
INSTALLED_APPS
+=
(
'django_nose'
,)
ELASTICSEARCH_URL
=
'http://127.0.0.1:9200'
ELASTICSEARCH_INDEX
=
'edx-notes-test'
ELASTICSEARCH_INDEX
=
'edx-notes-test'
# Number of rows to return by default in result.
###############################################################################
RESULTS_DEFAULT_SIZE
=
25
# Max number of rows to return in result.
RESULTS_MAX_SIZE
=
250
# Override default annotator-store elasticsearch settings.
# Override default annotator-store elasticsearch settings.
###############################################################################
es
.
host
=
ELASTICSEARCH_URL
es
.
host
=
ELASTICSEARCH_URL
es
.
index
=
ELASTICSEARCH_INDEX
es
.
index
=
ELASTICSEARCH_INDEX
annotator
.
elasticsearch
.
RESULTS_MAX_SIZE
=
RESULTS_MAX_SIZE
annotator
.
elasticsearch
.
RESULTS_MAX_SIZE
=
RESULTS_MAX_SIZE
###############################################################################
notesserver/settings/yaml_config.py
0 → 100644
View file @
162bfb5e
import
yaml
import
annotator
from
annotator
import
es
from
.common
import
*
# pylint: disable=unused-wildcard-import, wildcard-import
###############################################################################
# Explicitly declare here in case someone changes common.py.
###############################################################################
DEBUG
=
False
TEMPLATE_DEBUG
=
False
DISABLE_TOKEN_CHECK
=
False
###############################################################################
CONFIG_ROOT
=
os
.
environ
.
get
(
'EDXNOTES_CONFIG_ROOT'
)
with
open
(
CONFIG_ROOT
/
"edx-notes-api.yml"
)
as
yaml_file
:
config_from_yaml
=
yaml
.
load
(
yaml_file
)
vars
()
.
update
(
config_from_yaml
)
###############################################################################
# Override default annotator-store elasticsearch settings.
###############################################################################
es
.
host
=
ELASTICSEARCH_URL
es
.
index
=
ELASTICSEARCH_INDEX
annotator
.
elasticsearch
.
RESULTS_MAX_SIZE
=
RESULTS_MAX_SIZE
###############################################################################
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