feat: add feature toggle system for disabling modules and UI#28
feat: add feature toggle system for disabling modules and UI#28JacobCoffee merged 7 commits intomainfrom
Conversation
|
You have reached your Codex usage limits for code reviews. You can see your limits in the Codex usage dashboard. |
Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
There was a problem hiding this comment.
Pull request overview
Copilot reviewed 6 out of 6 changed files in this pull request and generated 4 comments.
💡 Add Copilot custom instructions for smarter, more guided reviews. Learn how to get started.
Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
There was a problem hiding this comment.
Pull request overview
Copilot reviewed 9 out of 9 changed files in this pull request and generated 2 comments.
💡 Add Copilot custom instructions for smarter, more guided reviews. Learn how to get started.
…to-creation - FeatureRequiredMixin now supports tuple of features (all must be enabled) - Applied mixin to all public views: pretalx (public_ui), sponsors (sponsors+public_ui), registration (registration+public_ui), programs (programs/travel_grants+public_ui) - FeatureFlags inline on ConferenceAdmin (like Sections), standalone admin kept - Auto-create FeatureFlags via post_save signal when Conference is created - Admin widget labels show "Default (enabled)" instead of "Unknown" - Narrowed blanket Exception catch to ObjectDoesNotExist in _get_db_flag Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
There was a problem hiding this comment.
Pull request overview
Copilot reviewed 15 out of 15 changed files in this pull request and generated no new comments.
💡 Add Copilot custom instructions for smarter, more guided reviews. Learn how to get started.
Summary
FeaturesConfigdataclass for module/UI toggles viaDJANGO_PROGRAM["features"]settingsFeatureFlagsmodel (per-conference,OneToOneField) for live runtime toggling via Django adminNonein DB = use settings default, explicitTrue/False= overridefeatures.pywithis_feature_enabled(feature, conference=None),require_feature(), andFeatureRequiredMixinall_ui_enabledoverrides both public and manage UI (from settings or DB)How to test in the UI
Start the dev server:
Create a superuser if needed:
Go to Django Admin at
/admin/Navigate to Conference > Feature flags and click "Add"
Select a conference and toggle features:
None) to use settings defaultsTrueorFalseto override for that specific conferenceTest the master switch:
all_ui_enabledtoFalsein the adminTest individual toggles:
registration_enabledtoFalseSettings.py still works as global defaults:
A conference can then re-enable it via the admin by setting its DB flag to
True.Test plan
FeatureFlagswith explicitFalsedisables feature for that conferenceFeatureFlagswithNonefalls back to settings defaultall_ui_enabled=Falsein DB disables both public_ui and manage_ui🤖 Generated with Claude Code