Skip to content

The Invoices project is a Django application built using Django Rest Framework (DRF) to manage invoices and invoice details. It provides APIs for CRUD operations on invoices and invoice details.

Notifications You must be signed in to change notification settings

Shankjbs571/thisCreate

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

5 Commits
 
 
 
 
 
 

Repository files navigation

Invoices

The Invoices project is a Django application built using Django Rest Framework (DRF) to manage invoices and invoice details. It provides APIs for CRUD operations on invoices and invoice details.

Installation

  1. Clone the repository:

    git clone https://github.com/Shankjbs571/thisCreate.git
  2. Navigate to the project directory:

    cd thisCreate
  3. Create a virtual environment and activate it (optional but recommended):

    python -m venv env
    source env/bin/activate  # for Linux/macOS
    .\env\Scripts\activate  # for Windows
  4. Install the dependencies:

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

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

    python manage.py runserver
  7. Access the API endpoints at:

API Endpoints

  • GET /api/invoices/: List all invoices.
  • POST /api/invoices/: Create a new invoice.
  • GET /api/invoices/<pk>/: Retrieve a specific invoice.
  • PUT /api/invoices/<pk>/: Update a specific invoice.
  • DELETE /api/invoices/<pk>/: Delete a specific invoice.
  • GET /api/invoice-details/: List all invoice details.
  • POST /api/invoice-details/: Create a new invoice detail.
  • GET /api/invoice-details/<pk>/: Retrieve a specific invoice detail.
  • PUT /api/invoice-details/<pk>/: Update a specific invoice detail.
  • DELETE /api/invoice-details/<pk>/: Delete a specific invoice detail.

Example Usage

  1. Create a new invoice:

    curl -X POST http://localhost:8000/api/invoices/ -d "date=2022-03-01&customer_name=John Doe"
  2. Update an invoice:

    curl -X PUT http://localhost:8000/api/invoices/1/ -d "date=2022-03-02"
  3. Delete an invoice:

    curl -X DELETE http://localhost:8000/api/invoices/1/

Requirements

  • Python 3.x
  • Django
  • Django Rest Framework

About

The Invoices project is a Django application built using Django Rest Framework (DRF) to manage invoices and invoice details. It provides APIs for CRUD operations on invoices and invoice details.

Topics

Resources

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published

Languages