From 3f6d6cbf84b9e280688bd0999129716e9131b4bb Mon Sep 17 00:00:00 2001 From: Renzo Lucioni Date: Fri, 20 Jan 2017 10:38:37 -0500 Subject: [PATCH] Reintroduce Waffle Waffle serves as a complement to config models. It's useful in feature rollout situations where you may not want to incur the overhead of creating and committing a migration (required for adding a field to a config model), and also handles gradual, percentage-based rollouts. ECOM-4422 --- cms/envs/common.py | 3 +++ lms/envs/common.py | 3 +++ requirements/edx/base.txt | 1 + 3 files changed, 7 insertions(+) diff --git a/cms/envs/common.py b/cms/envs/common.py index fd8154a9b8..d5cbeab985 100644 --- a/cms/envs/common.py +++ b/cms/envs/common.py @@ -393,6 +393,8 @@ MIDDLEWARE_CLASSES = ( # use Django built in clickjacking protection 'django.middleware.clickjacking.XFrameOptionsMiddleware', + 'waffle.middleware.WaffleMiddleware', + # This must be last so that it runs first in the process_response chain 'openedx.core.djangoapps.site_configuration.middleware.SessionCookieDomainOverrideMiddleware', ) @@ -820,6 +822,7 @@ INSTALLED_APPS = ( # Database-backed configuration 'config_models', + 'waffle', # Monitor the status of services 'openedx.core.djangoapps.service_status', diff --git a/lms/envs/common.py b/lms/envs/common.py index cc2145e9e9..89874df437 100644 --- a/lms/envs/common.py +++ b/lms/envs/common.py @@ -1187,6 +1187,8 @@ MIDDLEWARE_CLASSES = ( 'openedx.core.djangoapps.theming.middleware.CurrentSiteThemeMiddleware', + 'waffle.middleware.WaffleMiddleware', + # This must be last 'openedx.core.djangoapps.site_configuration.middleware.SessionCookieDomainOverrideMiddleware', ) @@ -1921,6 +1923,7 @@ INSTALLED_APPS = ( # Database-backed configuration 'config_models', + 'waffle', # Monitor the status of services 'openedx.core.djangoapps.service_status', diff --git a/requirements/edx/base.txt b/requirements/edx/base.txt index 0c7cca5619..f5bb4b96df 100644 --- a/requirements/edx/base.txt +++ b/requirements/edx/base.txt @@ -39,6 +39,7 @@ django-user-tasks==0.1.2 #djangorestframework>=3.1,<3.2 git+https://github.com/edx/django-rest-framework.git@3c72cb5ee5baebc4328947371195eae2077197b0#egg=djangorestframework==3.2.3 django==1.8.17 +django-waffle==0.11.1 djangorestframework-jwt==1.8.0 djangorestframework-oauth==1.1.0 edx-ccx-keys==0.2.1