@report_view("<STR_LIT>", form_type=forms.DiscountForm)<EOL>def discount_status(request, form):
discounts = form.cleaned_data["<STR_LIT>"]<EOL>items = commerce.DiscountItem.objects.filter(<EOL>Q(discount__in=discounts),<EOL>).select_related("<STR_LIT>", "<STR_LIT>", "<STR_LIT>")<EOL>items = group_by_cart_status(<EOL>items,<EOL>["<STR_LIT>"],<EOL>["<STR_LIT>", "<STR_LIT>"],<EOL>)<EOL>headings = [<EOL>"<STR_LIT>", "<STR_LIT>", "<STR_LIT>", "<STR_LIT>", "<STR_LIT>",<EOL>]<EOL>data = []<EOL>for item in items:<EOL><INDENT>data.append([<EOL>item["<STR_LIT>"],<EOL>item["<STR_LIT>"],<EOL>item["<STR_LIT>"],<EOL>item["<STR_LIT>"],<EOL>item["<STR_LIT>"],<EOL>])<EOL><DEDENT>return ListReport("<STR_LIT>", headings, data)<EOL>
Summarises the usage of a given discount.