DonGuillotine/AT100DaysChallenge

Implement Django REST Framework for API Development

Ouverte

#1 ouverte le 24 janv. 2025

 (6 commentaires) (0 réaction) (0 personne assignée)Python (1 fork)auto 404
backendenhancementgood first issue

Métriques du dépôt

Stars
 (2 étoiles)
Métriques de merge PR
 (Aucune PR mergée en 30 j)

Description

Convert the existing Django backend into a REST API using Django REST Framework (DRF).

Tasks:

  • Install djangorestframework and 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

Guide contributeur