def select_variant(request):
    variant_id = request.POST.get("variant_id")
    variant = Product.objects.get(pk=variant_id)
    msg = _(u"The product has been changed according to your selection.")

    result = json.dumps({
        "product": product_inline(request, variant),
        "message": msg,
    }, cls=LazyEncoder)

    return HttpResponse(result, content_type='application/json')
This is called via an ajax call if the combination of properties are
dataset/ETHPy150Open diefenbach/django-lfs/lfs/catalog/views.py/select_variant