﻿id	summary	reporter	owner	description	type	status	component	version	severity	resolution	keywords	cc	stage	has_patch	needs_docs	needs_tests	needs_better_patch	easy	ui_ux
35758	Use keyword argument rather than a positional argument for on_delete in the ForeignKey.on_delete docs.	kay	kay	"The code snippet for [https://docs.djangoproject.com/en/5.1/ref/models/fields/#django.db.models.ForeignKey.on_delete `ForeignKey.on_delete`] in the docs does not spell out `on_delete`, which looks odd and can be confusing.

While further up, [https://docs.djangoproject.com/en/5.1/ref/models/fields/#django.db.models.ForeignKey at the start] of the `ForeignKey` section, it is explained to be a positional argument, the subsection documenting the argument itself doesn't seem like the best place to demonstrate that it isn't actually a keyword argument. I'd therefore suggest to add it in.

For variety/to remind users of its positional nature, it could instead be removed from any of the preceding code blocks, which all include it. The [https://docs.djangoproject.com/en/5.1/ref/models/fields/#id3 `products/models.py` example] might make sense as it's only the second example in the overall `ForeignKey` section but identical to the first example.

Relatedly, the intro to the [https://docs.djangoproject.com/en/5.1/ref/models/fields/#arguments Arguments] section, which leads into `on_delete`, is ambiguously worded. It says, ""`ForeignKey` accepts **other** arguments that define the details of how the relation works."" (emphasis mine), suggesting what's next are optional arguments or ones not yet discussed... when `on_delete` is neither."	Cleanup/optimization	assigned	Documentation	5.1	Normal		ForeignKey, code examples		Accepted	0	0	0	0	0	0
