@permission_required("core.manage_shop")
def discount_data(request, id, template_name="manage/discounts/data.html"):
    discount = Discount.objects.get(pk=id)

    return render_to_string(template_name, RequestContext(request, {
        "form": DiscountForm(instance=discount),
        "discount": discount,
    }))
Returns the discount data as html.
dataset/ETHPy150Open diefenbach/django-lfs/lfs/manage/discounts/views.py/discount_data