{"enrichment":{"faq":[{"a":"django-idioms teaches model-centric design where business logic lives in models, not views. Follow the \"fat models, thin views\" pattern: use custom managers and QuerySet methods to encapsulate ORM logic, keep views focused on request/response handling, and leverage Django's built-in features like signals and properties. This separation improves testability and reusability across your application.","q":"What are django best practices for structuring models and views?"},{"a":"django-idioms covers query optimization through select_related and prefetch_related. Use select_related for forward ForeignKey and OneToOneField relationships to fetch related objects in a single query; use prefetch_related for reverse relations and ManyToMany fields. The skill emphasizes profiling with Django Debug Toolbar and understanding your ORM's SQL output to catch performance issues early.","q":"How does django-idioms address N+1 query problems?"},{"a":"django-idioms promotes pytest-django for cleaner, more flexible test organization than Django's default unittest framework. Use fixtures for setup, parametrize tests for multiple scenarios, and leverage factory-boy for realistic test data. The skill covers testing models, views, serializers, and API endpoints while maintaining fast test suites and clear assertions.","q":"What testing approach does django-idioms recommend with pytest?"},{"a":"django-idioms teaches DRF serializers as the bridge between models and JSON, with validation logic embedded in serializer methods. Combine them with class-based views (CBVs) like ViewSets and generics to reduce boilerplate. Understand when to override to_representation, validate, and create/update methods; keep serializers focused on data transformation, not business rules.","q":"How should I use DRF serializers and class-based views?"},{"a":"django-idioms identifies common pitfalls: querying in loops (N+1), using raw SQL when the ORM suffices, ignoring database constraints, and mixing data access with presentation logic. Learn to recognize these patterns, use Django's query analysis tools, and apply idiomatic solutions like custom managers, aggregation, and proper indexing for maintainable, performant code.","q":"What are django orm anti-patterns to avoid?"},{"a":"django-idioms covers migration best practices: write reversible migrations, avoid data migrations in production, test migrations locally, and use RunPython carefully with explicit rollback logic. Understand schema vs. data changes, deploy migrations before code, and use tools like django-safemigrate to prevent accidental downgrades in multi-environment setups.","q":"How does django-idioms guide safe database migrations?"}],"shadow_tags":["orm-optimization","rest-api-design","test-patterns","code-structure","query-performance","schema-management","validation-serialization","framework-conventions"],"summary_rewrite":"Learn Django conventions that emphasize model-centric design, clean separation of concerns, and test-driven development. This skill covers best practices for the ORM, views, migrations, and testing frameworks like pytest-django, helping you write maintainable, DRY code aligned with Django's philosophy."},"files":[{"bytes":3087,"path":".agents/skills/django-idioms/SKILL.md","sha256":"d09dbc335de62518f76f767f1b2835fe657ec2589cb3ff8be047becde5b9145f","url":"https://skillfed.io/files/irahardianto/awesome-agv/django-idioms/9a84e5d9/SKILL.md"}],"id":"irahardianto/awesome-agv/django-idioms","links":{"html":"https://skillfed.io/irahardianto/awesome-agv/django-idioms","md":"https://skillfed.io/irahardianto/awesome-agv/django-idioms.md","repo":"https://github.com/irahardianto/awesome-agv"},"meta":{"agents_supported":[],"first_seen":"2026-07-28","forks":48,"language":"JavaScript","last_updated":"2026-07-17","license":"MIT","name":"django-idioms","publisher":"irahardianto","stars":150},"relations":{"similar":[{"id":"irahardianto/awesome-agv/python-idioms"},{"id":"vintasoftware/django-ai-plugins/django-expert"},{"id":"Mindrally/skills/rest-api-django"},{"id":"Jeffallan/claude-skills/django-expert"},{"id":"xu-xiang/everything-claude-code-zh/django-verification"},{"id":"Mindrally/skills/django-rest-api-development"},{"id":"irahardianto/awesome-agv/spring-boot-idioms"},{"id":"affaan-m/ECC/django-verification"},{"id":"irahardianto/awesome-agv/laravel-idioms"},{"id":"irahardianto/awesome-agv/ml-engineering"}]},"slug":{"owner":"irahardianto","repo":"awesome-agv","skill":"django-idioms"},"version":"9a84e5d9"}
