This Django-based book app allows users to:
- Get book recommendations.
- Search for books and receive direct URLs to Amazon and Flipkart.
- View Goodreads reviews of books.
- Add books to their favorites.
- Track their search history.
- Book Recommendations:
- Search Functionality:
- Favorites Page:
- Search History:
- Django: Web framework for the backend.
- Beautiful Soup: Used for web scraping to fetch book data from Amazon, Flipkart, and Goodreads.
- SQLite: Default database used by Django.
-
Clone the repository:
git clone https://github.com/pavank1301/Django.git cd BookLibrary
-
Set up a virtual environment:
python -m venv venv source venv/bin/activate # On Windows, use `venv\Scripts\activate`
-
Install the dependencies:
pip install -r requirements.txt
-
Apply Migrations:
python manage.py makemigrations python manage.py migrate
-
Run the development server:
python manage.py runserver
-
Access the app at http://127.0.0.1:8000/
- Search for Books: Use the search bar to find books by title or author.
- View Details: The app will show Amazon and Flipkart URLs, along with Goodreads reviews.
- Add to Favorites: Click on a book to add it to your favorites list.
- View Search History: Access your search history to revisit previous searches.
If you encounter issues with migrations, try the following:
-
Fake migrations:
python manage.py migrate --fake <app_name> <migration_number>
-
Reset migrations: Delete migration files and the database, then reapply migrations:
find . -path "*/migrations/*.py" -not -name "__init__.py" -delete rm db.sqlite3 python manage.py makemigrations python manage.py migrate
- If you'd like to contribute, please fork the repository and make changes as you'd like. Pull requests are warmly welcome.