Reusable Django app for managing lists of books with ratings.
Project description
django-book-manager
This reusable Django application provides models suitable for managing a list of books with ratings, somewhat like a private Goodreads.
Its real purpose is to provide sample models, with sample data, for use in testing other Django libraries. Often, when authoring new Django libraries, we need a simple example application to use so that we can test out our code.
Getting It
You can get django-book-manager
by using pip:
pip install django-book-manager
If you want to install it from source, grab the git repository from GitHub and run setup.py
:
git clone git://github.com/caltechads/django-book-manager.git
cd django-book-manager
python setup.py install
Installing It
To enable book_manager
in your project you need to add it to INSTALLED_APPS
in your project's settings.py
file:
INSTALLED_APPS = (
...
'book_manager',
...
)
Then, apply the migrations to add the schema to your database:
./manage.py migrate
Using It
django-book-manager
provides these models:
-
book_manager.Book
: a book with title, slug, publishing dates, number of pages, authors, etc. -
book_manager.Author
: an author.book_manager.Book
has a many to many relationship with this -
book_manager.BookAuthor
: this is a many to many through table betweenbook_manager.Book
andbook_manager.Author
that exists to record billing order of authors on a book (first author, second author, etc.) -
book_manager.Publisher
: a publisher.book_manager.Book
has a foreign key relationship with this -
book_manager.Binding
: a binding (hardcover, softcover, ebook, ...).book_manager.Book
has a foreign key relationship with this -
book_manager.Reading
: a reading record of a book by a reader. This is a many to many through table betweenbook_manager.Book
and theAUTH_USER_MODEL
that records a rating, review, notes, date read, etc. for a particular user. -
book_manager.Shelf
: a collection ofbook_manager.Reading
objects, used by readers to classify books
django-book-manager
also supplies a command that can be used to load a
Goodreads user library export into Django, splitting
it into all the above models as appropriate.
To generate an export from Goodreads, go to your Goodreads account and:
- Click "My Books"
- At the bottom of that page, click "Import and Export"
- At the top of that page, click "Export Library"
To load the CSV thus generated into Django, first create a user for yourself in Django, then:
./manage.py import_csv <csvfile> <username>
A sample Goodreads export is available in this repository as sandbox/data/books.csv
.
Project details
Download files
Download the file for your platform. If you're not sure which to choose, learn more about installing packages.
Source Distribution
Built Distribution
Hashes for django-book-manager-0.2.0.tar.gz
Algorithm | Hash digest | |
---|---|---|
SHA256 | ba3cefb3c235dac2114aa7779348c212b0cc9277e3b14244431c3cd9b71683ae |
|
MD5 | 8a59b08a487c6882b3a57cc664e0eb64 |
|
BLAKE2b-256 | 7bef6e04df98ab8344e03379e7fdd3f586dfb64696f00545d2984584c5a62c22 |
Hashes for django_book_manager-0.2.0-py2.py3-none-any.whl
Algorithm | Hash digest | |
---|---|---|
SHA256 | f232b21d4b5a1b47c7a17d73037468f286cafbd0bb6e3e638958352134cf8314 |
|
MD5 | a9f47c0fe6d40015f06a9b37ae6f3d47 |
|
BLAKE2b-256 | 2172f3e4721d2ea660b82b9a0970390b4557c7b66186cf9194c7174247d5cd93 |