A customer and order management web app built with Django. Admins manage products, customers and orders from a dashboard, while customers sign in to track their own orders and manage their profile.
- Role-based access:
adminandcustomergroups, enforced with custom view decorators (admin_only,allowed_users,unauthenticated_user). - Admin dashboard: overview of customers and orders, product listing, per-customer order history.
- Order management: create, update and delete orders, with status tracking (
Pending,Out of Delivery,Delivered), notes and tags. - Search & filtering: filter orders by status, product, customer and note text using
django-filter. - Customer portal: registration, login/logout, personal order list and account settings with profile picture upload.
- Signals: on registration, a
Customerprofile is created and the user is added to thecustomergroup. - Deployment ready:
gunicorn+whitenoisewith aProcfilefor Heroku-style platforms.
| Model | Key fields |
|---|---|
Customer |
user (1:1), name, phone, email, profile_pic |
Product |
name, price, category (Indoor / Outdoor), description |
Order |
customer, product, status, note, tags |
tag |
name |
Python 3.8 · Django 3.1 · django-filter · Pillow · SQLite · Gunicorn · WhiteNoise
git clone https://github.com/alimohammad0816/Customer.git
cd Customer
python -m venv .venv
source .venv/bin/activate
pip install -r requirements.txt
export DJANGO_SECRET_KEY='change-me' # optional for local dev
python manage.py migrate
python manage.py createsuperuser
python manage.py runserverThen open http://127.0.0.1:8000/.
Create the admin and customer groups in the Django admin (/admin/) and assign users to them. Access to each page depends on the group.
Note:
DEBUGisFalseinconfig/settings.py(production-style). Set it toTruelocally if you want Django to serve debug pages.
accounts/ models, views, forms, filters, decorators, signals, templates
config/ Django settings, URLs, WSGI/ASGI
static/ CSS, images and uploaded media
Procfile gunicorn entry point for deployment
- Move remaining settings (
DEBUG,ALLOWED_HOSTS, database) to environment variables - Add automated tests for views and permissions
- Switch to PostgreSQL for production
No license specified yet.