def flag_enabled(context, flag_name): request = context.get('request', None) return base_flag_enabled(flag_name, request=request)
def flag_enabled(context, flag_name, request=None, **kwargs): if request is None: request = context.get("request") return base_flag_enabled(flag_name, request=request, **kwargs)
def flag_enabled(flag_name, request=None): """ Check if a flag is enabled for a given request """ return base_flag_enabled(flag_name, request=request)