Giter Site home page Giter Site logo

vendor_management_test's Introduction

Vendor Management System

This is a Vendor Management System developed using Django and Django REST Framework. The system handles vendor profiles, tracks purchase orders, and calculates vendor performance metrics.

Setup Instructions

Prerequisites

  • Python 3.8+
  • Django 3.2+
  • Django REST Framework
  • PostgreSQL (or any preferred database)

Installation

  1. Clone the repository:

    git clone https://github.com/your-repo/vendor-management.git
    cd vendor-management
  2. Create and activate a virtual environment:

    python3 -m venv venv
    source venv/bin/activate
  3. Install dependencies:

    pip install -r requirements.txt
  4. Apply migrations:

    python manage.py makemigrations
    python manage.py migrate
  5. Create a superuser:

    python manage.py createsuperuser
  6. Run the development server:

    python manage.py runserver
  7. Access the admin site at http://localhost:8000/admin/ and login with your superuser credentials.

API Endpoints

Vendor Endpoints

  • Create a new vendor

    POST /api/vendors/
  • List all vendors

    GET /api/vendors/
  • Retrieve a specific vendor's details

    GET /api/vendors/{vendor_id}/
  • Update a vendor's details

    PUT /api/vendors/{vendor_id}/
  • Delete a vendor

    DELETE /api/vendors/{vendor_id}/
  • Retrieve a vendor's performance metrics

    GET /api/vendors/{vendor_id}/performance/

Purchase Order Endpoints

  • Create a purchase order

    POST /api/purchase_orders/
  • List all purchase orders

    GET /api/purchase_orders/
  • Retrieve details of a specific purchase order

    GET /api/purchase_orders/{po_id}/
  • Update a purchase order

    PUT /api/purchase_orders/{po_id}/
  • Delete a purchase order

    DELETE /api/purchase_orders/{po_id}/

Authentication

To access the API, you need to authenticate using JWT tokens.

  • Obtain a token

    POST /api/token/
  • Refresh a token

    POST /api/token/refresh/

API Documentation

Interactive API documentation is available at:

  • Swagger UI: http://localhost:8000/swagger/
  • ReDoc: http://localhost:8000/redoc/

Running Tests

Run the test suite to verify the functionality and reliability of the endpoints:

python manage.py test

vendor_management_test's People

Contributors

rahul24tech avatar

Watchers

 avatar

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    ๐Ÿ–– Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. ๐Ÿ“Š๐Ÿ“ˆ๐ŸŽ‰

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google โค๏ธ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.