{
  "id": "django-select-for-update-table",
  "kind": "table",
  "slug": "django-select-for-update",
  "iil_id": null,
  "note_url": "https://iinventedlight.com/library/notes/django-select-for-update/",
  "title": "Lock Django rows with select_for_update inside atomic()",
  "columns": [
    "name",
    "source",
    "detail"
  ],
  "rows": [
    {
      "name": "nowait=True",
      "source": "Django docs",
      "detail": "The call is non-blocking. If a conflicting lock is already acquired, DatabaseError will be raised when the queryset is evaluated."
    },
    {
      "name": "skip_locked=True",
      "source": "Django docs",
      "detail": "Ignore locked rows. nowait and skip_locked are mutually exclusive and attempts to enable both raise ValueError."
    },
    {
      "name": "of=(...)",
      "source": "Django docs",
      "detail": "By default, rows of related objects specified in select_related() are locked too. Name the relations to lock; use \"self\" for the queryset's model."
    }
  ],
  "related_slugs": [
    "django-querysets",
    "django-models",
    "django-request-response"
  ],
  "license": "CC-BY-4.0",
  "source_license": "BSD-3-Clause (Django docs); BSD-3-Clause (Django (GitHub docs)); prose restates cited source lines in own words",
  "as_of": "2026-11-19",
  "status": "deep-draft-20261119",
  "note": "Restated from the note's GREEN sources; check those sources before relying on a value."
}