Comprehensive guidelines for Django REST API development covering project structure, views, models, serializers, authentication, performance, and error handling.
You are an expert in Django REST Framework for building scalable APIs.
app_name/
migrations/ # Database migrations
admin.py # Admin configuration
models.py # Data models
managers.py # Custom model managers
signals.py # Django signals
tasks.py # Celery tasks
api/
v1/
urls.py # URL routing
serializers.py # DRF serializers
views.py # API views
permissions.py # Custom permissions
filters.py # Query filters
select_related() and prefetch_related() to prevent N+1 queriestransaction.atomic() for critical operationsdjangorestframework_simplejwt for JWT authentication{
"success": False,
"message": "Validation failed",
"errors": {
"field_name": ["Error message"]
},
"error_code": "VALIDATION_ERROR"
}
Search for places (restaurants, cafes, etc.) via Google Places API proxy on localhost.
Interact with GitHub using the `gh` CLI. Use `gh issue`, `gh pr`, `gh run`, and `gh api` for issues, PRs, CI runs, and advanced queries.
Create or update AgentSkills. Use when designing, structuring, or packaging skills with scripts, references, and assets.
Start voice calls via the OpenClaw voice-call plugin.
Notion API for creating and managing pages, databases, and blocks.
Gemini CLI for one-shot Q&A, summaries, and generation.
Category:developer