Django patterns -- custom user model, project structure, models, views, URL routing, select_related/prefetch_related, signals vs save(), middleware, settings splitting, custom managers, management commands
92
87%
Does it follow best practices?
Impact
100%
1.63xAverage score across 5 eval scenarios
Passed
No known issues
{
"context": "Tests whether the agent proactively applies Django best practices when building a task tracker: custom user model, select_related for dashboard and task list queries, TextChoices for priority and status, save() override for auto-slug, app_name, settings splitting. The task describes a business tool without naming any patterns.",
"type": "weighted_checklist",
"checklist": [
{
"name": "Custom user model",
"description": "The project defines a custom user model inheriting from AbstractUser and sets AUTH_USER_MODEL in settings. The agent was NOT asked for a custom user model.",
"max_score": 12
},
{
"name": "select_related on dashboard projects",
"description": "The dashboard queryset uses select_related('owner') or equivalent to load project owner names without N+1 queries. The agent was NOT asked about query optimization.",
"max_score": 14
},
{
"name": "select_related on task list assignees",
"description": "The project detail page queryset uses select_related('assignee') or equivalent to load assignee names for tasks without N+1 queries.",
"max_score": 12
},
{
"name": "TextChoices for priority and status",
"description": "Task priority and status fields use TextChoices (or IntegerChoices) classes rather than raw string tuples.",
"max_score": 8
},
{
"name": "save() override for auto-slug",
"description": "The Project model generates its slug automatically in save() (using slugify or similar) rather than using a pre_save signal. The task says 'auto-generated slug' but does NOT say to use save().",
"max_score": 10
},
{
"name": "app_name in urls.py",
"description": "Each app's urls.py sets app_name for URL namespacing.",
"max_score": 8
},
{
"name": "settings.AUTH_USER_MODEL for FK",
"description": "ForeignKey fields to the user model use settings.AUTH_USER_MODEL, not a direct import of User.",
"max_score": 10
},
{
"name": "get_object_or_404 in detail view",
"description": "The project detail view uses get_object_or_404 (or equivalent CBV) rather than bare .get().",
"max_score": 8
},
{
"name": "related_name on ForeignKey fields",
"description": "ForeignKey fields (project owner, task assignee, task project) include related_name.",
"max_score": 6
},
{
"name": "db_index on status and priority",
"description": "Task status and/or priority fields have db_index=True for efficient filtering.",
"max_score": 6
},
{
"name": "Settings split into base/dev/prod",
"description": "Settings are organized into multiple files (base.py, dev.py, prod.py or equivalent) rather than a single settings.py.",
"max_score": 6
}
]
}evals
scenario-1
scenario-2
scenario-3
scenario-4
scenario-5
skills
django-best-practices
verifiers