This repository contains the source code for a Vendor Management System (VMS) developed using Django and Django REST Framework. The system allows for the management of vendor profiles, tracking of purchase orders, and calculation of vendor performance metrics.
- Python 3.9
- Django
- Django REST Framework
-
Clone the repository: git clone https://github.com/ANANDAPADMANABHA/vendor-management-system.git
-
Install dependencies: pip install -r requirements.txt
-
Run migrations: python manage.py migrate
-
Create a superuser (admin): python manage.py createsuperuser
-
Start the development server: python manage.py runserver
-
Access the application at
http://localhost:8000
.
The API endpoints are documented below:
-
Vendor Endpoints:
- POST /api/vendors/: Create a new vendor.
- GET /api/vendors/: List all vendors.
- GET /api/vendors/{vendor_id}/: Retrieve a specific vendor's details.
- PUT /api/vendors/{vendor_id}/: Update a vendor's details.
- DELETE /api/vendors/{vendor_id}/: Delete a vendor.
-
Purchase Order Endpoints:
- POST /api/purchase_orders/: Create a purchase order.
- GET /api/purchase_orders/: List all purchase orders with optional filtering.
- GET /api/purchase_orders/{po_id}/: Retrieve details of a specific purchase order.
- PUT /api/purchase_orders/{po_id}/: Update a purchase order.
- DELETE /api/purchase_orders/{po_id}/: Delete a purchase order.
-
Vendor Performance Endpoint:
- GET /api/vendors/{vendor_id}/performance: Retrieve a vendor's performance metrics.
For easy testing and interaction with the API endpoints, you can use the Postman collection provided here.
To run the test suite, execute the following command:
python manage.py test
Contributions are welcome! If you'd like to contribute to this project, please follow these steps:
- Fork the repository.
- Create a new branch (
git checkout -b feature/new-feature
). - Make your changes.
- Commit your changes (
git commit -am 'Add new feature'
). - Push to the branch (
git push origin feature/new-feature
). - Create a new pull request.
This project is licensed under the MIT License - see the LICENSE file for details.
- This project was developed as part of a Django Developer Assignment.