A simple Django-based library management system with REST API functionality.
- Book management (CRUD operations)
- REST API endpoints for book data
- SQLite database (default)
- Django admin interface
-
Clone the repository:
git clone https://github.com/GIOVESS/library.git cd library -
Create and activate virtual environment:
python -m venv .venv source .venv/bin/activate # Linux/Mac .venv\Scripts\activate # Windows
-
Install dependencies:
pip install -r requirements.txt
-
Run migrations:
python manage.py migrate
-
Create superuser (optional):
python manage.py createsuperuser
-
Run development server:
python manage.py runserver
GET /api/- List all booksPOST /api/- Add new bookGET /api/<id>/- Get specific book detailsPUT /api/<id>/- Update bookDELETE /api/<id>/- Remove book
library/
├── lib/ # Main project folder
│ ├── settings.py # Django settings
│ └── urls.py # Main URLs
├── books/ # Books app
│ ├── models.py # Book model
│ └── ...
├── apis/ # API app
│ ├── serializers.py # DRF serializers
│ ├── views.py # API views
│ └── ...
└── manage.py # Django management script
Access the admin panel at http://localhost:8000/admin/ after creating a superuser.
- Python 3.8+
- Django 5.0+
- Django REST Framework