| .vscode | ||
| container | ||
| site | ||
| .dockerignore | ||
| .drone.yml | ||
| .flake8 | ||
| .gitignore | ||
| .isort.cfg | ||
| .pip-tools.toml | ||
| .pre-commit-config.yaml | ||
| docker-compose.yaml | ||
| env-file.example | ||
| Makefile | ||
| README.md | ||
| renovate.json | ||
| requirements-dev.in | ||
| requirements-dev.txt | ||
| requirements.in | ||
| requirements.txt | ||
Django based library tracking
This project allows managing a book library, by importing books through search or by ISBN.
My goal was to have a solution to keep track of which books I own, and which books I've already read.
Running the application
If you are familiar with django (or python apps in general), you can create a new
virtual environment,
and install the requirements, and then use the settings.py to configure your
deployment.
But I would recommend to use the docker setup instead.
There is a dockerfile that can be used to build an image, and the docker-compose file can help you run the application.
Since django supports a multitude of databases, and I prefere to have a single shared database for all my applications, there isn't a database service in the compose file, but it's possible to configure the database connection using enviornment variavbles.
You can checkout the example env-file in the repo to see how to configure psql.
Google Books API
The application uses the google books api to fetch all book information and perform searches. To make use of it, you'll have to configure your own google api key.
Check out the google docs, how to get your API key at https://developers.google.com/books/docs/v1/using#APIKey
Updating book information
The application provides a CLI command, to update all books from the google books API at once.
The command is executed through the django manage.py as usual. To run it
inside the container you can use this command
$ docker exec -it django-book-tracker-book_tracker-1 sh -c "python /app/manage.py update_books"