File tree Expand file tree Collapse file tree
Expand file tree Collapse file tree Original file line number Diff line number Diff line change 33This file provides guidance to Claude Code (claude.ai/code) when working with code in this repository.
44
55## Build/Lint/Test Commands
6+ - Make sure to set the following so that test output is not too verbose: ` export PYTEST_ADDOPTS="--disable-warnings --no-header --tb=short" `
67- Backend testing: ` cd backend && pytest ` or ` cd backend && make test `
78- Run a single test: ` cd backend && pytest tests/test_models.py::test_placeholder `
89- Quality checks: ` cd backend && make quality `
@@ -19,3 +20,8 @@ This file provides guidance to Claude Code (claude.ai/code) when working with co
1920- Frontend uses React and follows standard JSX conventions
2021
2122Always run ` make quality ` and fix issues before creating a PR to ensure consistent code style.
23+
24+ ## API Development Guidelines
25+ - Handle permission checking in viewsets rather than serializers to maintain separation of concerns
26+ - Use ` perform_create() ` and ` perform_update() ` in viewsets for business logic and permission validation
27+ - Test API endpoints for both regular user and admin/staff scenarios when permissions are involved
You can’t perform that action at this time.
0 commit comments