@permission_required("core.manage_shop")
def manage_discount(request, id, template_name="manage/discounts/discount.html"):
    try:
        discount = Discount.objects.get(pk=id)
    except Discount.DoesNotExist:
        return HttpResponseRedirect(reverse("lfs_manage_discounts"))

    return render_to_response(template_name, RequestContext(request, {
        "discount": discount,
        "navigation": navigation(request),
        "data": discount_data(request, id),
        "products": products_tab(request, id),
        "criteria": discount_criteria(request, id),
    }))
The main view to manage the discount with given id.
dataset/ETHPy150Open diefenbach/django-lfs/lfs/manage/discounts/views.py/manage_discount