Skip to content

Commit ea1675c

Browse files
committed
docs: Add more context for claude code.
1 parent af4376d commit ea1675c

File tree

1 file changed

+6
-0
lines changed

1 file changed

+6
-0
lines changed

CLAUDE.md

Lines changed: 6 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -3,6 +3,7 @@
33
This 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

2122
Always 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

0 commit comments

Comments
 (0)