Skip to content

fix: read feature flags as flat Django settings - #337

Open
feanil wants to merge 1 commit into
openedx:mainfrom
feanil:feanil/features-dict-flat
Open

feanil wants to merge 1 commit into
openedx:mainfrom
feanil:feanil/features-dict-flat

Conversation

@feanil

@feanil feanil commented Nov 19, 2026

Copy link
Copy Markdown
Contributor

edx-platform flattened the FEATURES dict into top-level settings in Ulmo (openedx/openedx-platform#37067) and is now removing the dict and the FeaturesProxy bridge that kept settings.FEATURES reads working (openedx/openedx-platform#37396).

The video, discussion and html blocks read their flags with getattr on the flat names now, with the same defaults as before. The html block's "to enable" message names the flat setting. Behaviour on Ulmo and later is unchanged.

edx-platform has had every feature flag as a top-level setting since
Ulmo, and the FEATURES dict is being removed along with the FeaturesProxy
bridge that kept dict reads working:
openedx/openedx-platform#37396

The video, discussion and html blocks now read their flags with getattr
on the flat name, with the same defaults as before.  The html block's
"to enable" message names the flat setting.

Co-Authored-By: Claude Fable 5.1 <noreply@anthropic.com>
@feanil
feanil marked this pull request as ready for review November 19, 2026 19:37
@feanil
feanil requested a review from a team November 19, 2026 19:37
"FALLBACK_TO_ENGLISH_TRANSCRIPTS": False,
},
)
@patch.object(settings, "FALLBACK_TO_ENGLISH_TRANSCRIPTS", create=True, new=False)

@Kelketek Kelketek Nov 19, 2026 •

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Could this be an @override_settings call instead? That would be more idiomatic.

},
)
# The default value in {lms,cms}/envs/common.py and xmodule/tests/test_video.py should be consistent.
@patch.object(settings, "FALLBACK_TO_ENGLISH_TRANSCRIPTS", create=True, new=True)

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Same question here-- can we use @override_settings?

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants