Skip to main content
This is a pre-production deployment of Warehouse. Changes made here affect the production instance of PyPI (
Help us improve Python packaging - Donate today!

django-carton is a simple and lightweight application for shopping carts and wish lists.

Project Description
 /|     /|
+-+----+ |    django-carton helps you build your shopping
| |    | |    cart and which list functionality.
| +----+-+
|/     |/
  • It’s simple: You decide how to implement the views, templates and payment processing.
  • It’s lightweight: The cart lives in the session.
  • It’s just a container: You define your product model the way you want.

Usage Example


from django.http import HttpResponse

from carton.cart import Cart
from products.models import Product

def add(request):
    cart = Cart(request.session)
    product = Product.objects.get(id=request.GET.get('product_id'))
    cart.add(product, price=product.price)
    return HttpResponse("Added")

def show(request):
    return render(request, 'shopping/show-cart.html')

We are assuming here that your products are defined in an application called products.


{% load carton_tags %}
{% get_cart as cart %}

{% for item in cart.items %}
    {{ }}
    {{ item.quantity }}
    {{ item.total_price }}
{% endfor %}

You can also use this convinent shortcut:
{% for product in cart.products %}
    {{ }}
{% endfor %}
Release History

Release History

This version
History Node


History Node


History Node


History Node


History Node


History Node


History Node


History Node


Download Files

Download Files

Download the file for your platform. If you're not sure which to choose, learn more about installing packages.

File Name & Checksum SHA256 Checksum Help Version File Type Upload Date
django-carton-1.2.1.tar.gz (8.0 kB) Copy SHA256 Checksum SHA256 Source Feb 7, 2016

Supported By

WebFaction WebFaction Technical Writing Elastic Elastic Search Pingdom Pingdom Monitoring Dyn Dyn DNS Sentry Sentry Error Logging CloudAMQP CloudAMQP RabbitMQ Heroku Heroku PaaS Kabu Creative Kabu Creative UX & Design Fastly Fastly CDN DigiCert DigiCert EV Certificate Rackspace Rackspace Cloud Servers DreamHost DreamHost Log Hosting