Skip to content

A simple Django Rest API project with a simple front-end, drf backend, Swagger-UI & ReDoc documentation and Docker support.

License

Notifications You must be signed in to change notification settings

aybarskerem/BookInventory

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

5 Commits
 
 
 
 
 
 
 
 

Repository files navigation

BookInventory

  • A simple Django Rest API project with a simple front-end, drf backend, Swagger UI & ReDoc documentation and Docker support.

Requirements:

  • Python 3.8.10 (pip install can be sensitive to specific version)
  • Library/requirements.txt (pip install -r requirements.txt)
  • Currently only tested on Ubuntu 20.04 and Windows 10.

How to run:

  • cd Library

To activate a virtual environment first (Optional Step):

On Windows:

  • pip install virtualenv
  • virtualenv venv -p <path to python3.8.10 exe>
  • venv\Scripts\activate

On Ubuntu (20.04):

  • pip install virtualenv
  • virtualenv venv
  • source venv/bin/activate

To run in a local computer without containerization:

  • pip install -r requirements.txt
  • python manage.py migrate
  • python manage.py runserver

To run in a Docker container:

  • Firstly install Docker. (such as running sudo apt install docker-compose etc on a Debian based system to install the 'compose' tool.)
  • docker-compose build
  • docker-compose up

Non-API Pages (URLs):

  • http://localhost:8000/ to see all the books listed. Then any of the books can be clicked on to see its details. This url is also the root page. To list a book, firstly, books have to be created using the API pages.

API Pages (URLs):

Note that, in the API documentation pages, documentations for GET, POST, PATCH, PUT and DELETE requests for the BookInventory can be seen. Moreover, in Swagger UI for example, making a query is quite easy with example formats.

Query Functionality:

Keywords:

  • Django
  • Rest API
  • Model View Template
  • MVT
  • drf
  • drf-spectacular
  • Swagger-UI
  • ReDoc
  • Docker