def require_at_least_one_query_parameter(*query_parameter_names):
def outer_wrapper(view):<EOL><INDENT>"""<STR_LIT>"""<EOL>@wraps(view)<EOL>def wrapper(request, *args, **kwargs):<EOL><INDENT>"""<STR_LIT>"""<EOL>requirement_satisfied = False<EOL>for query_parameter_name in query_parameter_names:<EOL><INDENT>query_parameter_values = request.query_params.getlist(query_parameter_name)<EOL>kwargs[query_parameter_name] = query_parameter_values<EOL>if query_parameter_values:<EOL><INDENT>requirement_satisfied = True<EOL><DEDENT><DEDENT>if not requirement_satisfied:<EOL><INDENT>raise ValidationError(<EOL>detail='<STR_LIT>'.format(<EOL>params='<STR_LIT:U+002CU+0020>'.join(query_parameter_names)<EOL>)<EOL>)<EOL><DEDENT>return view(request, *args, **kwargs)<EOL><DEDENT>return wrapper<EOL><DEDENT>return outer_wrapper<EOL>
Ensure at least one of the specified query parameters are included in the request.

This decorator checks for the existence of at least one of the specified query
parameters and passes the values as function parameters to the decorated view.
If none of the specified query parameters are included in the request, a
ValidationError is raised.

Usage::
    @require_at_least_one_query_parameter('program_uuids', 'course_run_ids')
    def my_view(request, program_uuids, course_run_ids):
        # Some functionality ...