[Answer]-Value Error when render used (django 1.7.1)

1👍

render is a shortcut; it doesn’t take a Context object, it takes a plain dict.

context = {
    'product': Product.objects.get(pk=product_id).name,
    'ship_units': ShipUnit.objects.filter(product = product_id),
    'shop_units': ShopUnit.objects.filter(product = product_id),
}

Leave a comment