CtrlK
BlogDocsLog inGet started
Tessl Logo

tessl-labs/django-best-practices

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

1.63x
Quality

87%

Does it follow best practices?

Impact

100%

1.63x

Average score across 5 eval scenarios

SecuritybySnyk

Passed

No known issues

Overview
Quality
Evals
Security
Files

django-structure.jsonverifiers/

{
  "instruction": "Organize Django project with app-per-feature, custom user model, and split settings",
  "relevant_when": "Agent builds or scaffolds a Django application",
  "context": "Django projects should have one app per feature domain, a custom user model (AbstractUser) defined before the first migration with AUTH_USER_MODEL in settings, and settings split into base/dev/prod files.",
  "sources": [
    {
      "type": "file",
      "filename": "skills/django-best-practices/SKILL.md",
      "tile": "tessl-labs/django-best-practices@0.2.0"
    }
  ],
  "checklist": [
    {
      "name": "app-per-feature",
      "rule": "Agent creates separate Django apps for distinct feature domains (e.g., accounts, blog, orders) rather than putting all models in one app",
      "relevant_when": "Agent structures a Django project with multiple features"
    },
    {
      "name": "custom-user-model",
      "rule": "Agent defines a custom user model inheriting from AbstractUser in an accounts app and sets AUTH_USER_MODEL in settings",
      "relevant_when": "Agent sets up a new Django project"
    },
    {
      "name": "settings-splitting",
      "rule": "Agent splits settings into base.py, dev.py, and prod.py (or equivalent) rather than using a single settings.py with conditional logic",
      "relevant_when": "Agent configures Django project settings"
    },
    {
      "name": "auth-user-model-reference",
      "rule": "Agent uses settings.AUTH_USER_MODEL for ForeignKey references to the user model, not django.contrib.auth.models.User directly",
      "relevant_when": "Agent creates a model with a ForeignKey to the user"
    }
  ]
}

tile.json