django-feature
Installation
SKILL.md
Django Feature
Build the feature the way this codebase already builds features. The biggest review complaint on client projects isn't bugs, it's "we don't do it like that here". So: copy house style first, invent nothing.
Step 1: Learn the house style (don't skip)
Read the "How we do X here" section of the repo map if there is one. Then open the closest existing feature to what you're building (same app if possible, a similar CRUD resource otherwise) and note:
- Views:
ModelViewSet/GenericAPIView/APIView/ function views? Router or explicitpath()? - Where logic lives:
services.py/selectors.py, model methods, or serializers? - Permissions: which classes, and how
get_querysetscopes by user/org/tenant. - Serializers: separate read/write serializers?
fields = [...]explicitly listed (should be)? - Pagination, filtering (
django-filter?), ordering defaults. - Model conventions: base model (
TimeStampedModel, UUID pk?),related_namestyle,Meta.ordering,__str__. - Admin registration pattern.
- Tests: location, pytest-django vs
TestCase, factories (factory_boy?), API client fixtures inconftest.py. - URL and naming: kebab vs snake case in paths,
basenames.
Tell the dev in 4-6 bullets which existing feature you're mirroring and the patterns you'll copy. If two patterns coexist (legacy + new), ask which one is current.