django-api-debugger
3
总安装量
3
周安装量
#58417
全站排名
安装命令
npx skills add https://github.com/allthriveai/allthriveai --skill django-api-debugger
Agent 安装分布
mcpjam
3
antigravity
3
replit
3
junie
3
windsurf
3
zencoder
3
Skill 文档
Django API Debugger
Analyzes and debugs Django REST Framework API issues in this project.
Project Context
- Backend: Django 5.x with Django REST Framework
- API base path:
/api/v1/ - Key apps:
core/projects,core/users,core/tools - Serializers located in:
*/serializers.py - Views located in:
*/views.py - URL routing:
*/urls.py
When to Use
- “API returning wrong data”
- “Serializer not including field”
- “Permission denied on endpoint”
- “Pagination not working”
- “Filter not applying”
- “API response format incorrect”
Debugging Approach
1. Identify the Endpoint
- Check
urls.pyfor URL pattern - Find the corresponding view/viewset
2. Check the Serializer
- Verify fields are included
- Check
read_onlyandwrite_onlysettings - Look for custom
to_representationorto_internal_value - Verify nested serializers
3. Check the View
- Verify
querysetandget_queryset() - Check
permission_classes - Look for custom
get_serializer_context() - Verify pagination settings
4. Common Issues
Missing fields in response:
- Field not in serializer’s
fields - Field is
write_only=True - Property not defined on model
Permission errors:
- Missing or incorrect
permission_classes - User not authenticated
- Object-level permissions failing
Pagination issues:
- Check
DEFAULT_PAGINATION_CLASSin settings - Verify
page_sizeparameter - Check for
next/previousURLs in response
Key Files to Check
core/
âââ projects/
â âââ serializers.py # Project serializers
â âââ views.py # Project viewsets
â âââ urls.py # Project URL patterns
âââ users/
â âââ serializers.py # User serializers
â âââ views.py # User viewsets
âââ tools/
âââ serializers.py # Tool serializers
âââ views.py # Tool viewsets
Testing Tips
# Test endpoint directly
docker compose exec web python manage.py shell
>>> from core.projects.models import Project
>>> Project.objects.first().__dict__
# Check serializer output
>>> from core.projects.serializers import ProjectSerializer
>>> ProjectSerializer(Project.objects.first()).data