A comprehensive Django-based cafe management system with menu management, order processing, billing, and user role management.
- Add, edit, and delete menu items
- Categories: Beverages, Snacks, Meals, Desserts
- Image upload support for menu items
- Availability status toggle
- Create new orders with customer details
- Add multiple items to orders with quantities
- View all orders with status filtering
- Update order status (Pending, Preparing, Completed, Cancelled)
- Remove items from orders
- Automatic calculation of subtotal, discounts, and total
- Apply discounts to orders
- Generate printable invoices/receipts
- Detailed billing breakdown
- Admin: Full access to menu management, reports, and all features
- Staff/Cashier: Can place orders and generate bills
- Role-based access control throughout the system
- Today's total orders count
- Today's revenue from completed orders
- Pending vs completed orders statistics
- Most ordered items analysis
- Quick action buttons for common tasks
- Python 3.8 or higher
- pip (Python package manager)
-
Navigate to the project directory
-
Create a virtual environment (recommended)
python -m venv venv venv\Scripts\activate # On Windows
-
Install dependencies
pip install -r requirements.txt
-
Run database migrations
python manage.py makemigrations python manage.py migrate
-
Create a superuser (Admin account)
python manage.py createsuperuser
Follow the prompts to create your admin account.
-
Run the development server
python manage.py runserver
-
Access the application
- Open your web browser and go to:
http://127.0.0.1:8000/ - Admin panel:
http://127.0.0.1:8000/admin/
- Open your web browser and go to:
-
Login as Admin
- Use the superuser credentials you created
- Access the admin panel at
/admin/
-
Add Menu Items
- Go to Dashboard → Menu → Add Menu Item
- Add items with name, price, category, description, and optional image
- Set availability status
-
Create Staff Accounts
- Go to Admin panel → Users
- Create new users and assign appropriate permissions
- Staff users can access the main interface but not admin features
-
Place an Order
- Dashboard → New Order
- Enter customer name and notes
- Add menu items with quantities
- Apply discounts if needed
- Update order status as it progresses
-
View Orders
- Dashboard → Orders
- Filter by status (Pending, Preparing, Completed, Cancelled)
- Click on an order to view details or generate invoice
-
Generate Invoice
- From order detail page, click "View Invoice"
- Print the invoice using the print button
- Invoice includes all order details and billing breakdown
-
Monitor Performance
- Dashboard shows today's statistics
- View most ordered items
- Track revenue and order counts
Cafe/
├── cafe_project/ # Django project settings
│ ├── __init__.py
│ ├── settings.py
│ ├── urls.py
│ ├── wsgi.py
│ └── asgi.py
├── cafe_app/ # Main application
│ ├── __init__.py
│ ├── admin.py # Admin configuration
│ ├── apps.py # App configuration
│ ├── forms.py # Form definitions
│ ├── models.py # Database models
│ ├── urls.py # URL routing
│ └── views.py # View functions
├── templates/ # HTML templates
│ ├── base.html # Base template
│ └── cafe_app/ # App-specific templates
│ ├── dashboard.html
│ ├── menu_list.html
│ ├── menu_form.html
│ ├── menu_confirm_delete.html
│ ├── order_list.html
│ ├── order_form.html
│ ├── order_detail.html
│ ├── order_invoice.html
│ └── signup.html
├── static/ # Static files
│ └── css/
│ └── style.css
├── media/ # User-uploaded files (created automatically)
├── manage.py # Django management script
├── requirements.txt # Python dependencies
└── README.md # This file
- Stores menu item details
- Fields: name, price, category, description, image, is_available
- Stores order information
- Fields: order_number, customer_name, status, subtotal, discount, total, notes
- Status options: pending, preparing, completed, cancelled
- Links orders to menu items
- Fields: order, menu_item, quantity, price_at_order
- Full access to all features
- Can manage menu items
- Can access Django admin panel
- Can view all reports and statistics
- Can place orders
- Can generate bills
- Can update order status
- Cannot access menu management or admin panel
- Django 4.2+: Web framework
- Python 3.8+: Programming language
- SQLite: Database (default)
- Bootstrap 5: Frontend framework
- Font Awesome: Icons
- Pillow: Image handling
Update the CATEGORY_CHOICES in cafe_app/models.py:
CATEGORY_CHOICES = [
('beverages', 'Beverages'),
('snacks', 'Snacks'),
('meals', 'Meals'),
('desserts', 'Desserts'),
('new_category', 'New Category'), # Add your category here
]Edit the color values in templates/base.html and static/css/style.css:
- Primary color:
#d35400(orange) - Change to your preferred color scheme
- Run:
python manage.py collectstatic - Ensure
STATIC_URLandSTATICFILES_DIRSare correctly set insettings.py
- Ensure
MEDIA_URLandMEDIA_ROOTare correctly set insettings.py - Check that the media directory has write permissions
- Delete the
db.sqlite3file - Run migrations again:
python manage.py migrate
This project is provided as-is for educational and commercial use.