Skip to content

Build Category ViewSet with endpoints #19

Description

@RossCabrera

Overview

Create Django REST Framework ViewSet for Categories with create, read,
update, delete operations. Implement user isolation and color validation.

Requirements

  • Create CategorySerializer with color validation
  • Create CategoryViewSet with CRUD operations
  • Validate hex color format (#RRGGBB)
  • Ensure name is unique per user
  • Implement user isolation
  • Handle deletion (notes.category becomes NULL)

Acceptance Criteria

  • Users see only own categories (AC-NOTE-03)
  • Categories have name and color (AC-NOTE-03)
  • Color hex validation works
  • Name unique per user
  • Authenticated access required
  • 404 for non-existent categories
  • 403 for unauthorized access
  • Deleting category sets notes.category to NULL
  • Input validation (name required, length limits)
  • Case-insensitive duplicate check

Related User Stories

  • US-NOTE-06: Color-coded categories

Related Acceptance Criteria

  • AC-NOTE-03: Custom category names and colors

Related Issues

Activity

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

Labels

TaskGeneral work that doesn’t directly add features or fix bugs (maintenance, updates, setup tasks).backendServer-side logic, database models, APIs, authentication, and business logic

Projects

Relationships

None yet

Development

No branches or pull requests

Issue actions