A Django-based personal library management system with a SQLite backend, full CRUD for books, borrowing/returning workflows, search & filtering, and reporting dashboards. The web UI is the primary frontend, and the admin panel provides advanced management capabilities.
Build a system that manages a personal book collection with complete CRUD operations, intelligent search, basic borrowing/returning logic, and reporting. The implementation uses a SQLite database and a Django frontend.
- Book management (create, view, update, delete)
- Borrowing and returning flows
- Search by title, author, ISBN, description
- Filter by genre, availability, and publication year range
- Borrow history and active borrowing lists
- Reports: genre stats, overdue books, totals
- Admin dashboard with inline borrow records and bulk actions
- SQLite storage: enabled via Django SQLite backend
- Two related tables:
BookandBorrowRecord - CRUD for books: implemented via Django views/forms
- Search by title/author/genre/year range: implemented in list view
- Safe delete: only when all copies are available
- Borrow/return logic: implemented with availability checks
- Borrowed books list: shows who borrowed and when
- Reports: popular genres, overdue, totals
For a detailed, line-by-line compliance check, see docs/STATUS_CHECK.md.
- Django 4.2 (Web framework)
- SQLite (database)
- django-crispy-forms + crispy-bootstrap5 (UI forms)
- django-filter (filtering)
- django-tables2 (tabular output)
- pytest + pytest-django (tests)
- django-debug-toolbar (development)
library/ # Core library app (models, views, forms, admin)
reports/ # Reporting app (dashboards and analytics)
library_project/ # Django project settings and URLs
templates/ # Shared templates (base layout)
static/ # CSS/JS assets
media/ # Uploaded media
/docs/ # Documentation
- Create and activate a virtual environment.
- Install dependencies from
requirements.txt. - Apply migrations and create a superuser.
- Run the development server.
Optional sample data:
- Run the
load_sample_datamanagement command to seed the database.
Container support is included via a Dockerfile and docker-compose.
- Docker assets: Dockerfile, docker-compose.yml, entrypoint.sh
- Full usage instructions: docs/DOCKER.md
The admin interface includes:
- Inline
BorrowRecordhistory on eachBook - Availability/status badges
- Bulk action to mark records as returned
- Filter/search controls for fast auditing
Full admin usage notes: docs/ADMIN_SITE.md.
This project is provided for educational purposes.
