A full-featured e-commerce web application built with Django (Python) backend and HTML/CSS/JavaScript frontend.
| Feature | Details |
|---|---|
| 🛒 Shopping Cart | Session-based (guests) + user-linked carts with auto-merge on login |
| 📦 Product Catalogue | Categories, search, filtering, stock management |
| 🔍 Product Detail | Full info, related products, quantity selector |
| 📋 Order Processing | Checkout → order confirmation → order history with status tracking |
| 👤 User Auth | Register, login, logout, profile with shipping address |
| 🗄️ SQLite Database | Products, Users, Profiles, Carts, Orders — all stored |
| 🛠️ Admin Panel | Full Django admin at /admin/ |
pip install -r requirements.txtpython manage.py migratepython seed_data.pyThis creates:
- 12 sample products across 5 categories
- Admin account:
admin/admin123
python manage.py runserverOpen http://127.0.0.1:8000 in your browser.
ecommerce_project/
├── ecommerce/ # Django project settings
│ ├── settings.py
│ └── urls.py
├── store/ # Main app
│ ├── models.py # Database models
│ ├── views.py # All view logic
│ ├── forms.py # Registration, profile, checkout forms
│ ├── urls.py # URL routing
│ ├── admin.py # Admin configuration
│ └── context_processors.py
├── templates/
│ ├── store/ # HTML templates
│ └── registration/ # Auth templates
├── static/
│ ├── css/style.css # Complete design system
│ └── js/main.js
├── media/ # Uploaded product images
├── seed_data.py # Sample data loader
├── requirements.txt
└── manage.py
Visit http://127.0.0.1:8000/admin/ and log in with admin / admin123.
From admin you can:
- Add/edit/delete products and categories
- Upload product images
- View and update order statuses
- Manage users
- Go to
/admin/→ Products → select a product - Upload an image in the Image field
- Images are stored in
media/products/
| URL | Page |
|---|---|
/ |
Home / featured products |
/products/ |
Product listing with filters |
/products/<slug>/ |
Product detail |
/cart/ |
Shopping cart |
/checkout/ |
Checkout (login required) |
/orders/ |
Order history (login required) |
/orders/<id>/ |
Order detail |
/register/ |
User registration |
/login/ |
Login |
/profile/ |
User profile |
/admin/ |
Django admin |
- Add payment gateway: Integrate Stripe or Razorpay in
views.py → checkout() - Email notifications: Configure
EMAIL_*settings and send on order creation - More categories: Add via admin panel or
seed_data.py - Production: Set
DEBUG=False, use PostgreSQL, configureALLOWED_HOSTS