It is a public web portal implemented using Python/Django(MVT structure).
It contains the list of book and also have information about its copies and book info link provided by Google Book Api. Anybody can access it, there is no need to login or authenticate(for now).
-
User can add a book or also copy of a existing book to the bookstore.
-
User can also remove or delete the book from the bookstore.
-
User can also get the information about the book on clicking on its title.
-
There is also a search box which shows the books with the help of Google Book Api for the given query.
-
Searched books have indication on their bottom, weather it is already exist in bookstore or not.
-
For existing books, user can add or remove a copy from bookstore and for non-existing books, user can add this book to the bookstore.
-
User also able to see the copies of a book and ID of book provided by Google Book Api.
-
If a book already existed in inventory but now its copies becomes 0 then it will show "Out of Stock".
In start bookstore have no book. User can add books to the bookstore via search box.
Using Python3.
Create a virtual environment.
Clone the repo:
git clone https://github.com/sandeepsajan0/inventorybooksapp.git
Install all requirements:
pip3 install -r requirements.txt
You have to configure database for run server locally:
In bookstore/settings.py
uncomment
DATABASES = { 'default': { 'ENGINE': 'django.db.backends.sqlite3', 'NAME': os.path.join(BASE_DIR, 'db.sqlite3'), } }
and comment
DATABASES = {} DATABASES['default'] = dj_database_url.config(conn_max_age=600)
Now you need to migrate the database:
python3 manage.py makemigrations
python3 manage.py migrate
Now you can run the sever:
python3 manage.py runserver
hurray! you app is running on: http://127.0.0.1:8000/
It has a simple structure.
For configuration issues or information, you should go through settings.py
.
For feature implementation or function issue, go through views.py
.
For template issues, go through booklist.html
and main.css
.
For database or model information, go through models.py
.
Live Demo
It is live on heroku. https://inventorybooksapp.herokuapp.com/