Skip to content

Data Science Books website built using Python, Django web framework, Bootstrap4, and more...

Notifications You must be signed in to change notification settings

YassineZITI/django-ds-books

Repository files navigation

django-ds-books

this repo presents a website where you can look for data science books and discuss data science topics. the website is built using Django3 Bootstrap4 with Postgresql database. i hosted a lite version of this project on heroku platform see it here

Machine Learning in this project

there is two applications of machine learning algorithms in this project:

  1. Content Based Recommander System to similars to each book you can see the notebook where i build this recommander system using nlp(in this repo).
  2. Super users can uppload new books so to ensure that they uppload only it books i built a book classifier that can classify books based on their descriptions on IT books or Not you can find more details about this classifier in this repo

Demo

  • home page : 1

  • category books page : 2

4

  • book detail : book_details

  • discussions : 5

  • category posts : category_posts

  • topic posts :topic_posts

  • post detail : post_detail

  • login form : login

  • register form : register_form

  • review form : review_form

  • search form : search

Installation

  1. clone the repo:
  • if you have git installed: git clone https://github.com/YassineZITI/django-ds-books/edit/main/README.md
  • if you don't. use this website to download the repo.
  1. set up envirement:
  • pip install virtualenv
  • virtualenv venv
  • pip install -r requirements.txt
  1. Database:
  • you need a postgres database for this project(we use an array field wich is available only in postgres django).
  • replace the database configuration in settings.py file with yours.
  • python manage.py makemigrations
  • python manage.py migrate
  • now you need some data(books) see next step.
  1. populate database:

first method:

in this repo there are files called books.json and categories.json you will use those files to populate your database.

  • py manage.py loaddata categories.json
  • py manage.py loaddata books.json

second method:

if you didn't succeed with the 1st method you can use app_data.pkl and categories.pkl with the following steps instead.

  • open your commande prompt and type py manage.py shell
  • from blog.models import Book,Category
  • import pickle
  • with open('app_data.pkl','rb') as f:
  • indentation books = pickle.load(f)
  • with open('categories.pkl','rb') as f:
  • indentation categories = pickle.load(f)
  • for i in categories:
  • indentation category = Category(name=i)
  • indentation ` category.save()
  • for i in books:
  • indentation book=Book(ISBN=i['isbn13'],title=i['title'],description=i['description'],author=i['authors'],publisher=i['publisher'],published=i['year'],pages=i['pages'],stars=i['rating'],price=i['price'],image=i['image'],category=Category.objects.get(name=i['category']),similar_books=i['similar'],embedding=i['embedding'])
  • indentation book.save()
  1. start server: py manage.py runserver

Improvements

  • add like option on posts and comments.
  • add models for machine learning models.
  • add profile section for users.
  • add admin dashboard.
  • ...

Contribution

Contributions are welcome, and they are greatly appreciated! Every little bit helps, and credit will always be given. Please star the repo and feel free to use it. ....

About

Data Science Books website built using Python, Django web framework, Bootstrap4, and more...

Topics

Resources

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published