Skip to content

Commit 97f95fd

Browse files
refactor: hoist annotations for common settings (#37888)
1 parent 8201e57 commit 97f95fd

File tree

3 files changed

+39
-31
lines changed

3 files changed

+39
-31
lines changed

cms/envs/common.py

Lines changed: 0 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -68,10 +68,6 @@
6868
# Dummy secret key for dev/test
6969
SECRET_KEY = 'dev key'
7070

71-
# .. setting_name: STUDIO_NAME
72-
# .. setting_default: Your Platform Studio
73-
# .. setting_description: The name that will appear on the landing page of Studio, as well as in various emails and
74-
# templates.
7571
STUDIO_NAME = _("Your Platform Studio")
7672
STUDIO_SHORT_NAME = _("Studio")
7773

lms/envs/common.py

Lines changed: 0 additions & 27 deletions
Original file line numberDiff line numberDiff line change
@@ -96,15 +96,6 @@
9696

9797
REROUTE_ACTIVATION_EMAIL = False # nonempty string = address for all activation emails
9898

99-
# .. toggle_name: settings.ENABLE_DISCUSSION_HOME_PANEL
100-
# .. toggle_implementation: DjangoSetting
101-
# .. toggle_default: True
102-
# .. toggle_description: Hides or displays a welcome panel under the Discussion tab, which includes a subscription
103-
# on/off setting for discussion digest emails.
104-
# .. toggle_use_cases: open_edx
105-
# .. toggle_creation_date: 2013-07-30
106-
# .. toggle_warning: This should remain off in production until digest notifications are online.
107-
# .. toggle_tickets: https://github.com/openedx/edx-platform/pull/520
10899
ENABLE_DISCUSSION_HOME_PANEL = False
109100

110101
# .. toggle_name: settings.ENABLE_DISCUSSION_EMAIL_DIGEST
@@ -288,19 +279,6 @@
288279
"certificate_status"
289280
]
290281

291-
# Turn off account locking if failed login attempts exceeds a limit
292-
# .. toggle_name: settings.ENABLE_MAX_FAILED_LOGIN_ATTEMPTS
293-
# .. toggle_implementation: DjangoSetting
294-
# .. toggle_default: True
295-
# .. toggle_description: This feature will keep track of the number of failed login attempts on a given user's
296-
# email. If the number of consecutive failed login attempts - without a successful login at some point - reaches
297-
# a configurable threshold (default 6), then the account will be locked for a configurable amount of seconds
298-
# (30 minutes) which will prevent additional login attempts until this time period has passed. If a user
299-
# successfully logs in, all the counter which tracks the number of failed attempts will be reset back to 0. If
300-
# set to False then account locking will be disabled for failed login attempts.
301-
# .. toggle_use_cases: open_edx
302-
# .. toggle_creation_date: 2014-01-30
303-
# .. toggle_tickets: https://github.com/openedx/edx-platform/pull/2331
304282
ENABLE_MAX_FAILED_LOGIN_ATTEMPTS = True
305283

306284
# Hide any Personally Identifiable Information from application logs
@@ -852,11 +830,6 @@
852830

853831
DATA_DIR = '/edx/var/edxapp/data'
854832

855-
# .. setting_name: MAINTENANCE_BANNER_TEXT
856-
# .. setting_default: None
857-
# .. setting_description: Specifies the text that is rendered on the maintenance banner.
858-
# .. setting_warning: Depends on the `open_edx_util.display_maintenance_warning` waffle switch.
859-
# The banner is only rendered when the switch is activated.
860833
MAINTENANCE_BANNER_TEXT = None
861834

862835
# Set certificate issued date format. It supports all formats supported by

openedx/envs/common.py

Lines changed: 39 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1385,6 +1385,31 @@ def add_optional_apps(optional_apps, installed_apps):
13851385
# .. toggle_tickets: 'https://openedx.atlassian.net/browse/VAN-622'
13861386
ENABLE_COPPA_COMPLIANCE = False
13871387

1388+
# .. toggle_name: settings.ENABLE_DISCUSSION_HOME_PANEL
1389+
# .. toggle_implementation: DjangoSetting
1390+
# .. toggle_default: True
1391+
# .. toggle_description: Hides or displays a welcome panel under the Discussion tab, which includes a subscription
1392+
# on/off setting for discussion digest emails. (Note: set to False by default in the CMS).
1393+
# .. toggle_use_cases: open_edx
1394+
# .. toggle_creation_date: 2013-07-30
1395+
# .. toggle_warning: This should remain off in production until digest notifications are online.
1396+
# .. toggle_tickets: https://github.com/openedx/edx-platform/pull/520
1397+
ENABLE_DISCUSSION_HOME_PANEL: bool
1398+
1399+
# .. toggle_name: settings.ENABLE_MAX_FAILED_LOGIN_ATTEMPTS
1400+
# .. toggle_implementation: DjangoSetting
1401+
# .. toggle_default: True
1402+
# .. toggle_description: This feature will keep track of the number of failed login attempts on a given user's
1403+
# email. If the number of consecutive failed login attempts - without a successful login at some point - reaches
1404+
# a configurable threshold (default 6), then the account will be locked for a configurable amount of seconds
1405+
# (30 minutes) which will prevent additional login attempts until this time period has passed. If a user
1406+
# successfully logs in, all the counter which tracks the number of failed attempts will be reset back to 0. If
1407+
# set to False then account locking will be disabled for failed login attempts. (Note: set to False by default in the CMS).
1408+
# .. toggle_use_cases: open_edx
1409+
# .. toggle_creation_date: 2014-01-30
1410+
# .. toggle_tickets: https://github.com/openedx/edx-platform/pull/2331
1411+
ENABLE_MAX_FAILED_LOGIN_ATTEMPTS: bool
1412+
13881413
###################### CAPA External Code Evaluation #######################
13891414

13901415
# Used with XQueue
@@ -2953,3 +2978,17 @@ def should_send_learning_badge_events(settings):
29532978
# .. toggle_use_cases: open_edx
29542979
# .. toggle_creation_date: 2012-07-13
29552980
WIKI_ENABLED = True
2981+
2982+
# .. setting_name: MAINTENANCE_BANNER_TEXT
2983+
# .. setting_default: None
2984+
# .. setting_description: Specifies the text that is rendered on the maintenance banner.
2985+
# (Note: set to 'Sample banner message' by default in the CMS).
2986+
# .. setting_warning: Depends on the `open_edx_util.display_maintenance_warning` waffle switch.
2987+
# The banner is only rendered when the switch is activated.
2988+
MAINTENANCE_BANNER_TEXT: str | None
2989+
2990+
# .. setting_name: STUDIO_NAME
2991+
# .. setting_default: Your Platform Studio
2992+
# .. setting_description: The name that will appear on the landing page of Studio, as well as in various emails and
2993+
# templates. (Note: set to 'Studio' by default in the LMS).
2994+
STUDIO_NAME: str

0 commit comments

Comments
 (0)