The Online Library Website is a Django-based web application that allows users to browse, borrow, and manage books online. The system supports two types of users: Admins and Users, each with specific roles and features.
-
Sign Up and Login:
- Admins can create an account by filling in a form with fields such as username, password, email, and selecting the
is_adminoption. - Login securely to access the admin dashboard.
- Admins can create an account by filling in a form with fields such as username, password, email, and selecting the
-
Manage Books:
- Add new books with details such as ID, name, author, category, and description.
- View a list of all available books.
- Edit book details.
- Delete books from the database.
-
Sign Up and Login:
- Users can create an account by filling in a form with fields such as username, password, and email.
- Login securely to access user-specific features.
-
Borrow Books:
- View a list of available books marked as "Available" or "Not Available" (if borrowed by another user).
- View detailed book information on a separate book page.
- Borrow books (only if marked as "Available").
-
View Borrowed Books:
- Users can view a personalized list of books they have borrowed.
- Dynamic Navigation Bar:
- The navigation bar dynamically updates based on the logged-in user type (Admin/User).
- Accessible from all pages of the website.
- Python 3.x
- Django Framework
- SQLite (default database)
-
Clone the Repository:
git clone https://github.com/yourusername/online-library.git cd online-library -
Install Dependencies:
pip install -r requirements.txt
-
Run Migrations:
python manage.py makemigrations python manage.py migrate
-
Run the Development Server:
python manage.py runserver
-
Open your browser and navigate to
http://127.0.0.1:8000/.
📁 online-library
├── 📁 adm
│ ├── 📁 pycache
│ ├── 📁 migrations
│ ├── 📁 static
│ ├── 📁 templates
│ ├── 📄 init.py
│ ├── 📄 admin.py
│ ├── 📄 apps.py
│ ├── 📄 models.py
│ ├── 📄 tests.py
│ ├── 📄 urls.py
│ └── 📄 views.py
│
├── 📁 Authentication
│ ├── 📁 pycache
│ ├── 📁 migrations
│ ├── 📁 static
│ ├── 📁 templates
│ ├── 📄 init.py
│ ├── 📄 admin.py
│ ├── 📄 apps.py
│ ├── 📄 models.py
│ ├── 📄 tests.py
│ ├── 📄 urls.py
│ └── 📄 views.py
│
├── 📁 library
│ ├── 📁 pycache
│ ├── 📄 init.py
│ ├── 📄 asgi.py
│ ├── 📄 settings.py
│ ├── 📄 urls.py
│ └── 📄 wsgi.py
│
└── 📁 user
│ ├── 📁 pycache
│ ├── 📁 migrations
│ ├── 📁 static
│ ├── 📁 templates
│ ├── 📄 init.py
│ ├── 📄 admin.py
│ ├── 📄 apps.py
│ ├── 📄 models.py
│ ├── 📄 tests.py
│ ├── 📄 urls.py
│ ├── 📄 views.py
└──📄 manage.py
└──📄 db.sqlite3