A web-based Library Management System built with Django that handles book inventory, user authentication, and a structured borrowing workflow with Admin oversight.
-
User Authentication: Secure Registration and Login system using Django's
AuthenticationForm. -
Book Discovery: A home page gallery where users can view available books and their current status.
-
Borrowing Workflow:
-
Request to Borrow: Users can request a book; the book is immediately marked as unavailable.
-
Admin Approval: Admins must approve the borrow request before the user is officially "borrowing" the book.
-
Return Workflow:
-
Request to Return: Users send a return request once finished with a book.
-
Final Approval: Admins verify the return, which then marks the book as "Available" for others to borrow again.
-
User Dashboard: A personal space for users to track their borrowing history, request statuses, and admin feedback.
-
Admin Panel: A customized Django Admin interface with bulk actions to approve or reject requests efficiently.
- Backend: Django 5.0+ (Python)
- Database: SQLite (Development)
- Frontend: Django Templates (HTML/CSS)
- Clone the repository:
git clone https://github.com/yourusername/library-management-system.git
- Install dependencies:
pip install django
- Apply migrations:
python manage.py makemigrations
python manage.py migrate
- Create a Superuser (Admin):
python manage.py createsuperuser
- Run the server:
python manage.py runserver
models.py: DefinesBookandLoan(with states: Pending, Approved, Return Pending, Returned).views.py: Handles the logic for borrowing, returning, and dashboard filtering.admin.py: Customizes the admin dashboard with "Approve Borrow" and "Approve Return" actions.
- Email notifications for approval/rejection.
- Fine system for overdue books.
- Search and filter functionality for the book gallery.
Would you like me to add a specific section about how the CSRF security or the "Return Request" logic works under the hood?