@permission_required("core.manage_shop")
def add_customer_tax(request, template_name="manage/customer_tax/add_customer_tax.html"):
    if request.method == "POST":
        form = CustomerTaxForm(data=request.POST, files=request.FILES)
        if form.is_valid():
            tax = form.save()

            return lfs.core.utils.set_message_cookie(
                url=reverse("lfs_manage_customer_tax", kwargs={"id": tax.id}),
                msg=_(u"Customer tax has been added."),
            )
    else:
        form = CustomerTaxForm()

    return render_to_response(template_name, RequestContext(request, {
        "form": form,
        "customer_taxes": CustomerTax.objects.all(),
        "next": (request.POST if request.method == 'POST' else request.GET).get("next", request.META.get("HTTP_REFERER")),
    }))
Provides a form to add a new customer tax.
dataset/ETHPy150Open diefenbach/django-lfs/lfs/manage/customer_tax/views.py/add_customer_tax