CLAUDE.md — Django + DRF + Celery
CLAUDE.md template for Django REST Framework projects with Celery task queues and split settings.
claude-mdpythondjangoceleryai-config
Prompt
# CLAUDE.md ## Project Overview {{project_name}} — {{one-line description}} ## Tech Stack - Language: Python 3.11+ - Framework: Django 5.0+ / Django REST Framework - Task Queue: Celery + Redis - Database: PostgreSQL - Testing: pytest-django - Linting: ruff ## Commands ```bash python manage.py runserver # Dev server python manage.py test # Run tests celery -A config worker --loglevel=info # Start worker python manage.py makemigrations # Generate migrations python manage.py migrate # Apply migrations ``` ## Directory Structure ``` config/ # Django project settings ├── settings/ │ ├── base.py # Shared settings │ ├── local.py # Dev overrides │ └── production.py # Prod overrides apps/ ├── {{app_name}}/ │ ├── models.py │ ├── serializers.py # DRF serializers │ ├── views.py # ViewSets │ ├── urls.py │ ├── tasks.py # Celery tasks │ ├── services.py # Business logic │ └── tests/ ``` ## Conventions - Fat models, thin views — complex logic in model methods or services.py - Use ModelSerializer for standard CRUD, custom serializers for complex input - Celery tasks for anything that takes > 500ms - Always use select_related/prefetch_related to avoid N+1 queries - Permissions in permissions.py, not inline in views - Use Django signals sparingly — prefer explicit service calls
Variables to customize
{{project_name}}{{one-line description}}{{app_name}}
Why this prompt works
'Celery tasks for anything > 500ms' is an actionable rule Claude can apply consistently. The split settings pattern tells Claude which file to edit for environment-specific changes.
Save this prompt to your library
Organize, version, and access your best prompts across ChatGPT, Claude, and Cursor.
Related prompts
CLAUDE.md — Next.js + TypeScript + Tailwind
Production CLAUDE.md template for Next.js App Router projects with TypeScript strict mode and Tailwind CSS.
CLAUDE.md — Python + FastAPI + SQLAlchemyCLAUDE.md template for async FastAPI projects with SQLAlchemy 2.0, Alembic migrations, and pytest.
CLAUDE.md — Go + Chi Router + PostgreSQLCLAUDE.md template for Go APIs using Chi, pgx, and idiomatic Go project structure.
CLAUDE.md — React Native + ExpoCLAUDE.md template for React Native Expo projects with file-based routing, NativeWind, and Zustand.