A web application for a local library to manage books, members, and transactions. This project allows the librarian to track books, issue and return books, and manage rental fees with ease.
The Library Management System includes the following functionalities:
-
Books Management
- Add new books, update book details, delete books, and manage stock.
- Search for books by title or author.
-
Members Management
- Add, update, and delete members.
- Track member details including name, email, phone number, and rental debt.
-
Transactions
- Issue books to members and record the transaction.
- Handle book returns and charge rental fees.
- Ensure members’ outstanding debt does not exceed KES 500 before issuing a new book.
-
Rental Fee Management
- Automatically charge fees upon book return based on rental duration.
- Backend: Django (Python)
- Frontend: HTML, CSS, Bootstrap
- Database: SQLite (for development), Postgres/MySQL (for production)
- Deployment: Yet to be deployed
- Python 3.8.10
- Django
- Virtual Environment (venv)
To run the project locally:
-
Clone the repository:
git clone [email protected]:Nyae44/django-library-management.git cd django-library-management
-
Ensure Python version 3.8.10: Make sure you have Python 3.8.10 installed. You can check your version with:
python --version
If you don't have Python 3.8.10 installed, you can install it or use a version manager like
pyenv
to set it up. -
Create a virtual environment:
python3 -m venv venv source venv/bin/activate # On Windows: venv\Scripts\activate
-
Set environment variables: Create a
.env
file in the root of the project and add the following:SECRET_KEY=your-secret-key DEBUG=True # Or False in production
-
Install dependencies:
pip install -r requirements.txt
-
Run migrations:
python manage.py migrate
-
Create a superuser (for the admin panel):
python manage.py createsuperuser
-
Run the development server:
python manage.py runserver
-
Access the application:
- Go to
http://127.0.0.1:8000
in your browser to view the library management system. - Go to
http://127.0.0.1:8000/admin
to access the Django admin panel.
- Go to
- Add, update, or delete books with stock tracking.
- View, add, or update member details. Track their outstanding rental debt.
- Issue a book to a member, with the option to manage due dates and rental fees.
- Return a book, automatically calculating and applying rental fees.
This project is licensed under the MIT License - see the LICENSE file for details.