Skip to content

Implement Category CRUD via ModelViewSet and Custom Action #41

Description

@devsmish

Description:

Set up the standard API endpoints for the Category model and implement a custom endpoint to aggregate task data.

Acceptance Criteria & Steps:

Create ViewSet: Implement CategoryViewSet inheriting from DRF's ModelViewSet to handle standard CRUD operations.

Configure Routing: Register the new viewset with the application's router to expose the URL endpoints.

Add Custom Action: Use the @action decorator to create a custom detail endpoint (count_tasks). This endpoint must calculate and return the total number of tasks linked to the specific category.

Metadata

Metadata

Assignees

Labels

enhancementNew feature or request

Projects

No projects

Milestone

No milestone

Relationships

None yet

Development

No branches or pull requests

Issue actions