def METHOD_NAME(request):
    user = request.user
    query = request.GET.get('q', '')
    context = {
        'user': request.user,
        'user_is_teacher': True if Course.objects.filter(teachers=user).count() else False,
        'query': query,
        'user_profiles': search_users(query, user)[1],
        'courses': search_courses(query, user)[1],
    }
    return render(request, 'search.html', context)