Django — лучшие практики веб-разработки

engineering

django is a Claude Code skill that provides best practices for Django web development, covering models, views, URL routing, templates, forms, admin, and management commands. It guides project structure with split settings (base/dev/prod), model design using database indexes, `F()` and `Q()` expressions, and queryset optimization via `select_related()` and `prefetch_related()` to eliminate N+1 query problems. The testing section covers `pytest-django` with `@pytest.mark.django_db`, `RequestFactory`, `Client`, and `model-bakery` for fixture-free test setup. Developers building scalable Django applications will also find clear guidance on avoiding common pitfalls: circular imports, secrets in `settings.py`, blocking I/O in async views, and unnecessary raw SQL.