E-commerce site with Django
A working online shop: catalogue, cart in the session, checkout, orders and an admin dashboard.
What you'll learn
- βSession-based cart
- βTransactions and stock
- βPayment gateway test mode and webhooks
What you'll build
- βCategories, product search and filters
- βCart without login (session)
- βCheckout with address and test payment
- βOrder emails and admin order management
Step-by-step guide
- 1
Catalogue
Product(name, slug, price, stock, image, category, available) with list/detail views and search by name.
- 2
Cart
Store {product_id: qty} in request.session; a Cart helper class to add, remove, total.
- 3
Checkout
OrderForm for name and address; create Order and OrderItems inside transaction.atomic(), reduce stock with select_for_update().
- 4
Payment
Use your gateway's test mode and test keys (Razorpay or Stripe); never mark an order paid from the browser alone; confirm via the server-side signature check or webhook.
- 5
Emails
Send an order confirmation with Django's send_mail (console backend while developing).
- 6
Admin
Order admin with inline items, filters by status and date, and an action to mark shipped.
- 7
Deploy
Static and media files, environment variables for keys, HTTPS.
π Make it stand out
- +Coupons
- +Product reviews
- +Invoice PDF