def category_filter_children(request, category, name="category_filter", level=1):
    """Returns the children of the given category as HTML.
    """
    categories = []
    for category in category.category_set.all():
        children = category_filter_children(request, category, name, level + 1)
        categories.append({
            "id": category.id,
            "name": ("&nbsp;" * level * 5, category.name) % "%s%s",
            "children": children,
            "level": level,
            "selected": str(category.id) == request.session.get("product_filters", {}).get("category")
        })

    result = render_to_string("manage/category/category_filter_children.html", RequestContext(request, {
        "categories": categories
    }))

    return result
dataset/ETHPy150Open diefenbach/django-lfs/lfs/manage/templatetags/lfs_manage_tags.py/category_filter_children/swapped operands of `%`