The objective of this project is to develop a system that automates the process of ordering and managing food in a canteen. The system is built using the Django web framework and the Tailwind CSS framework for the frontend design. This will provide a convenient and efficient solution for both Admin and Canteen staff, allowing admin to easily place orders and track their status, and allowing canteen staff to manage the orders efficiently.
- Staff registration and login
- Menu management
- Order management
- Bill generation
- Summary of Transactions
- Create virtualenv
python -m venv env
env\Scripts\activate
- Install all the requirements
pip install -r requirements.txt
- Install django-tailwind
python -m pip install django-tailwind
- Start a postgres database called 'cas' on default port (5432)
- Create
.env
in root folder and add the following (refer Development Notes)
SECRET_KEY=<django_secret_key>
DATABASE_URL=<your_database_url>
API_KEY=<cloudinary_api_key>
API_SECRET=<cloudinary_api_secret>
CLOUD_NAME=<cloudinary_cloud_name>
- Make migrations
python manage.py makemigrations
python manage.py migrate
- Create a super user.
python manage.py createsuperuser
- Running server
python manage.py runserver
python manage.py tailwind start
DATABASE_URL
inenv
is in the form ofpostgres://user:pass@host/dbname
SECRET_KEY
can be generated usingget_random_secret_key()
method
from django.core.management.utils import get_random_secret_key
print(get_random_secret_key())
-
Cloudinary related
env
vars can be accessed by signing up on Cloudinary and opening up the dashboard. -
Modify npm bin path (only if you're using Windows). Currently it is set to
NPM_BIN_PATH = '/usr/local/bin/npm'
for Mac & Linux based systems. If you're using Windows, you need to change it toNPM_BIN_PATH = r"C:\Program Files\nodejs\npm.cmd"
in settings.py of cas project. Do not stage settings.py while pushing to repo. -
If you add install any package during development, add it to requirements.txt by
pip freeze > requirements.txt
- Develop on a different branch (like 'feat/home-page', 'fix/overflow-issue' for different features/bug fixes and make PR to main or a single branch for all development purposes called 'develop' and make PRs to main from there
Nagaraj Pandith | Nidheesha T | Rudradeep Roy |