lzpmpc005 / bookstore_v

By vincentyelpen & Chart0n

Geek Repo:Geek Repo

Github PK Tool:Github PK Tool



Bookstore Management System


Project Status

Operating systems CPU Architect

Introduction

Bookstore This project is part of a Django-based book management system(Only backend). It provides the following features:

  • Add books and authors
  • View inventory and filter books
  • Update and delete books
  • Bulk delete books

Installation and Run

  1. Clone the project to your local machine:
git clone https://github.com/your_username/your_project.git
cd your_project
  1. Create a virtual environment and install dependencies:
python -m venv venv
source venv/bin/activate  # For Linux/macOS
venv\Scripts\activate  # For Windows

pip install -r requirements.txt

dependencies:

django python>3.11 croshead

  1. Perform database migration:
python manage.py migrate
  1. Run the development server:
python manage.py runserver
  1. Visit http://localhost:8000/ to view the project.

πŸ’‘ xxx xxx.


Table of contents


API Endpoints

  1. Add a Book

Endpoint: /add_book Method: POST

  1. Bulk Add Books

Endpoint: /add_books Method: POST

  1. View Inventory

Endpoint: /inventory Method: GET Returns information about all books.

  1. Filter Books

Endpoint: /filter Method: GET

  1. Update a Book

Endpoint: /update_book/<book_id> Method: PUT

  1. Delete a Book

Endpoint: /delete_book/<book_id> Method: DELETE

  1. Bulk Delete Books

Endpoint: /aggregate_delete Method: DELETE

  • Increase data privacy, which is an important factor for sensitive data.
  • Decrease data streaming, which is a fundamental condition to optimize network communication.
  • Autonomous, intelligent and self-aware devices with services directly in the environment of data origin.

Models

  1. Author Model

name: CharField with a maximum length of 100 characters to store the author's name. method: It returns the string representation of the Author object, which is the author's name.

  1. Book Model

title: CharField with a maximum length of 100 characters to store the book's title. authors: ManyToManyField linking to the Author model, allowing multiple authors for a single book. price: DecimalField to store the book's price with a maximum of 5 digits, 2 of which are after the decimal point. method: It returns the string representation of the Book object, including the book's ID and title.


Thank you all!

Special thanks to all contributors and supporters that starred this repository.

Do you like this project? Please join us or give a ⭐. This will help to attract more contributors.
Do you have an idea or found a bug? Please open an issue or start a discussion.


Contact us at

y.cheng22@lancaster.ac.uk


Share the project link with your network on social media.

About

By vincentyelpen & Chart0n

License:MIT License


Languages

Language:Python 100.0%