def render_admin_menu_item(request, page, template=None, language=None,
                           open_nodes=()):
    """
    Renders requested page item for the tree. This is used in case when item
    must be reloaded over ajax.
    """
    if not template:
        template = "admin/cms/page/tree/menu_fragment.html"

    if not page.pk:
        # Not found - tree will remove item
        return HttpResponse(NOT_FOUND_RESPONSE)

    # languages
    from cms.utils import permissions
    languages = get_language_list(page.site_id)
    context = {
        'has_add_permission': permissions.has_page_add_permission_from_request(request),
        'site_languages': languages,
        'open_nodes': open_nodes,
    }
    filtered = 'filtered' in request.GET or request.POST in 'filtered'
    context.update(get_admin_menu_item_context(request, page, filtered, language))
    return render_to_string(template, context)
dataset/ETHPy150Open divio/django-cms/cms/utils/admin.py/render_admin_menu_item/swapped operands of `in`