DonGuillotine/AT100DaysChallenge
Implement Django REST Framework for API Development
开放
#1 创建于 2025年1月24日
backendenhancementgood first issue
仓库指标
- 星标
- (2 个星标)
- PR 合并指标
- (PR 指标待抓取)
描述
Convert the existing Django backend into a REST API using Django REST Framework (DRF).
Tasks:
- Install
djangorestframeworkand add to requirements.txt - Configure DRF in Django settings
- Create serializers for Book and BookChunk models
- Implement API viewsets for models
- Set up API routing with DRF router
- Add API documentation using drf-spectacular or drf-yasg
- Create basic API endpoints:
- GET /api/books/ - List all books
- GET /api/books/{id}/ - Get specific book details
- GET /api/books/{id}/chunks/ - Get book chunks