context['cart'].append(cart)
return context


class Cart(object):
    """
    Cart Template class
    This is a magic class, having attributes
    name, author, publisher, price, discount, total, image
    You can add other attributes on the fly
    """
pass
Accessing dictionary by key in Django template