ClaudeDjangoArchitecture

Django Claude Rules

Claude rules for Django: project structure, DRF patterns, Celery, and production Django best practices.

CLAUDE.md
- Structure Django apps by domain/feature; keep each app small and focused
- Use Django REST Framework with serializers for all API endpoints
- Use django-filter for filterable list endpoints; avoid manual filtering logic
- Queue background tasks with Celery; use Redis as the broker
- Use django-storages for file uploads to S3 or compatible storage
- Enable django-silk or django-debug-toolbar for query profiling in development
- Use pytest-django with factory-boy for testing; never use Django's TestCase when pytest works
- Deploy with gunicorn + nginx; never run Django's development server in production

How to use with Claude

Create a `CLAUDE.md` file in your project root. Claude Code reads this on startup and follows your conventions throughout the session.

#django#drf#celery#claude#coding-rules

Related Rules