[BD-21] Document settings with annotations
We introduce the documentation of django settings via code annotations. This will allow us to produce a human-readable documentatio of all Open edX settings.
This commit is contained in:
@@ -160,6 +160,12 @@ PLATFORM_TWITTER_ACCOUNT = "@YourPlatformTwitterAccount"
|
|||||||
# Dummy secret key for dev/test
|
# Dummy secret key for dev/test
|
||||||
SECRET_KEY = 'dev key'
|
SECRET_KEY = 'dev key'
|
||||||
FAVICON_PATH = 'images/favicon.ico'
|
FAVICON_PATH = 'images/favicon.ico'
|
||||||
|
|
||||||
|
|
||||||
|
# .. setting_name: STUDIO_NAME
|
||||||
|
# .. setting_default: Your Platform Studio
|
||||||
|
# .. setting_description: The name that will appear on the landing page of Studio, as well as in various emails and
|
||||||
|
# templates.
|
||||||
STUDIO_NAME = _("Your Platform Studio")
|
STUDIO_NAME = _("Your Platform Studio")
|
||||||
STUDIO_SHORT_NAME = _("Studio")
|
STUDIO_SHORT_NAME = _("Studio")
|
||||||
FEATURES = {
|
FEATURES = {
|
||||||
|
|||||||
@@ -15,20 +15,27 @@ release = ""
|
|||||||
|
|
||||||
# -- General configuration ---------------------------------------------------
|
# -- General configuration ---------------------------------------------------
|
||||||
|
|
||||||
extensions = ["code_annotations.config_and_tools.sphinx.extensions.featuretoggles"]
|
extensions = ["code_annotations.contrib.sphinx.extensions.featuretoggles", "code_annotations.contrib.sphinx.extensions.settings"]
|
||||||
templates_path = ["_templates"]
|
templates_path = ["_templates"]
|
||||||
exclude_patterns = ["_build", "Thumbs.db", ".DS_Store"]
|
exclude_patterns = ["_build", "Thumbs.db", ".DS_Store"]
|
||||||
|
|
||||||
featuretoggles_source_path = os.path.abspath(
|
edxplatform_repo_url = "https://github.com/edx/edx-platform"
|
||||||
|
edxplatform_source_path = os.path.abspath(
|
||||||
os.path.join(os.path.dirname(__file__), "..", "..")
|
os.path.join(os.path.dirname(__file__), "..", "..")
|
||||||
)
|
)
|
||||||
featuretoggles_repo_url = "https://github.com/edx/edx-platform"
|
|
||||||
try:
|
try:
|
||||||
edx_platform_version = git.Repo(search_parent_directories=True).head.object.hexsha
|
edx_platform_version = git.Repo(search_parent_directories=True).head.object.hexsha
|
||||||
except git.InvalidGitRepositoryError:
|
except git.InvalidGitRepositoryError:
|
||||||
edx_platform_version = "master"
|
edx_platform_version = "master"
|
||||||
|
|
||||||
|
featuretoggles_source_path = edxplatform_source_path
|
||||||
|
featuretoggles_repo_url = edxplatform_repo_url
|
||||||
featuretoggles_repo_version = edx_platform_version
|
featuretoggles_repo_version = edx_platform_version
|
||||||
|
|
||||||
|
settings_source_path = edxplatform_source_path
|
||||||
|
settings_repo_url = edxplatform_repo_url
|
||||||
|
settings_repo_version = edx_platform_version
|
||||||
|
|
||||||
# -- Options for HTML output -------------------------------------------------
|
# -- Options for HTML output -------------------------------------------------
|
||||||
|
|
||||||
html_theme = "edx_theme"
|
html_theme = "edx_theme"
|
||||||
|
|||||||
@@ -1,3 +1,22 @@
|
|||||||
|
Open edX Django settings
|
||||||
|
========================
|
||||||
|
|
||||||
|
This is the list of Django settings defined in the ``common.py`` modules of edx-platform.
|
||||||
|
|
||||||
|
LMS settings
|
||||||
|
------------
|
||||||
|
|
||||||
|
.. TODO move this to a dedicated page
|
||||||
|
.. settings::
|
||||||
|
:folder_path: lms/envs/common.py
|
||||||
|
|
||||||
|
CMS settings
|
||||||
|
------------
|
||||||
|
|
||||||
|
.. settings::
|
||||||
|
:folder_path: cms/envs/common.py
|
||||||
|
|
||||||
|
|
||||||
Open edX Feature Toggles
|
Open edX Feature Toggles
|
||||||
========================
|
========================
|
||||||
|
|
||||||
|
|||||||
@@ -55,7 +55,10 @@ from openedx.core.release import doc_version
|
|||||||
from lms.djangoapps.lms_xblock.mixin import LmsBlockMixin
|
from lms.djangoapps.lms_xblock.mixin import LmsBlockMixin
|
||||||
|
|
||||||
################################### FEATURES ###################################
|
################################### FEATURES ###################################
|
||||||
# The display name of the platform to be used in templates/emails/etc.
|
# .. setting_name: PLATFORM_NAME
|
||||||
|
# .. setting_default: Your Platform Name Here
|
||||||
|
# .. setting_description: The display name of the platform to be used in
|
||||||
|
# templates/emails/etc.
|
||||||
PLATFORM_NAME = _('Your Platform Name Here')
|
PLATFORM_NAME = _('Your Platform Name Here')
|
||||||
PLATFORM_DESCRIPTION = _('Your Platform Description Here')
|
PLATFORM_DESCRIPTION = _('Your Platform Description Here')
|
||||||
CC_MERCHANT_NAME = PLATFORM_NAME
|
CC_MERCHANT_NAME = PLATFORM_NAME
|
||||||
|
|||||||
@@ -4,12 +4,12 @@ Tests for Blockstore-based Content Libraries
|
|||||||
"""
|
"""
|
||||||
from contextlib import contextmanager
|
from contextlib import contextmanager
|
||||||
from io import BytesIO
|
from io import BytesIO
|
||||||
from mock import patch
|
|
||||||
from urllib.parse import urlencode
|
from urllib.parse import urlencode
|
||||||
import unittest
|
import unittest
|
||||||
|
|
||||||
from django.conf import settings
|
from django.conf import settings
|
||||||
from django.test.utils import override_settings
|
from django.test.utils import override_settings
|
||||||
|
from mock import patch
|
||||||
from organizations.models import Organization
|
from organizations.models import Organization
|
||||||
from rest_framework.test import APITestCase, APIClient
|
from rest_framework.test import APITestCase, APIClient
|
||||||
from search.search_engine_base import SearchEngine
|
from search.search_engine_base import SearchEngine
|
||||||
|
|||||||
Reference in New Issue
Block a user