@permission_required("core.manage_shop")
def category_view(request, category_id, template_name="manage/category/view.html"):
    category = lfs_get_object_or_404(Category, pk=category_id)

    if request.method == "POST":
        form = ViewForm(instance=category, data=request.POST)
        if form.is_valid():
            form.save()
            message = _(u"View data has been saved.")
        else:
            message = _(u"Please correct the indicated errors.")
    else:
        form = ViewForm(instance=category)

    view_html = render_to_string(template_name, RequestContext(request, {
        "category": category,
        "form": form,
    }))

    if request.is_ajax():
        html = [["#view", view_html]]
        return HttpResponse(json.dumps({
            "html": html,
            "message": message,
        }, cls=LazyEncoder), content_type='application/json')
    else:
        return view_html
Return a list of RarInfos, descripting the contents of the archive.
dataset/ETHPy150Open diefenbach/django-lfs/lfs/manage/categories/view.py/category_view--crossover with--dataset/ETHPy150Open beville/ComicStreamer/libs/comictaggerlib/UnRAR2/__init__.py/RarFile.infolist