Skip to content
alimohammad0816Public

About

a Simple Customer and Order manager with Django

Resources

Stars

7 stars

Watchers

1 watching

Forks

Latest commit

 

History

18 Commits

Folders and files

Repository files navigation

Customer

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.

Features

  • Role-based access: admin and customer groups, 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 Customer profile is created and the user is added to the customer group.
  • Deployment ready: gunicorn + whitenoise with a Procfile for Heroku-style platforms.

Data model

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

Tech stack

Python 3.8 · Django 3.1 · django-filter · Pillow · SQLite · Gunicorn · WhiteNoise

Getting started

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 runserver

Then 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: DEBUG is False in config/settings.py (production-style). Set it to True locally if you want Django to serve debug pages.

Project structure

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

Possible improvements

  • Move remaining settings (DEBUG, ALLOWED_HOSTS, database) to environment variables
  • Add automated tests for views and permissions
  • Switch to PostgreSQL for production

License

No license specified yet.

About

a Simple Customer and Order manager with Django

Resources

Stars

7 stars

Watchers

1 watching

Forks

Releases

Packages

Contributors

Languages