def check_feature_enabled(feature_name):
 def _check_feature_enabled(view_func):
  def _decorator(request, *args, **kwargs):
   if (not settings.FEATURES.get(feature_name, False)):
    return HttpResponseBadRequest()
   return view_func(request, *args, **kwargs)
  return wraps(view_func)(_decorator)
 return _check_feature_enabled

def check_feature_enabled ( feature_name ) : def _check_feature_enabled ( view_func ) : def _decorator ( request , * args , ** kwargs ) : if ( not settings . FEATURES . get ( feature_name , False ) ) : return HttpResponseBadRequest ( ) return view_func ( request , * args , ** kwargs ) return wraps ( view_func ) ( _decorator ) return _check_feature_enabled
ensure the specified feature is turned on .