A Django-based Delivery Management System that handles vehicle and issue management, including calculation of final prices based on vehicle issues.
- Manage vehicles and components
- Track issues and their costs
- Calculate the final price based on issues associated with a vehicle
- Python 3.12 or later
- Django 5.1 or later
-
Clone the Repository:
git clone https://github.com/jainkarun8/Delivery-Management-System.git
-
Create a Virtual Environment:
python -m venv venv
-
Activate the Virtual Environment:
-
On Windows:
venv\Scripts\activate
-
On macOS/Linux:
source venv/bin/activate
-
-
Install Dependencies:
pip install -r requirements.txt
-
Apply Migrations:
python manage.py migrate
-
Run the Development Server:
python manage.py runserver
-
Access the Application:
Open your web browser and navigate to
http://127.0.0.1:8000/
to view the application.
-
Calculate Final Price
- URL:
/calculate-price/<vehicle_id>/
- Method:
GET
- URL:
You can access the Django admin interface at http://127.0.0.1:8000/admin/
to manage vehicles, components, and issues.
In my case
username asus
password karun
Running Tests To ensure everything is working correctly, run the tests using the following command:
python manage.py test
Test Cases Test Vehicle Price Calculation: Validates the calculation of the total price based on issues associated with a vehicle. Test Issue Management: Ensures that issues can be created, updated, and associated with vehicles and components correctly.