Opened 2 years ago

Closed 2 years ago

Last modified 2 years ago

#28557 closed Cleanup/optimization (fixed)

docs label `to` __init__ parameter as `othermodel` for ForeignKey, OneToOneField, ManyToManyField

Reported by: Robert Raiford Owned by: nobody
Component: Documentation Version: 1.11
Severity: Normal Keywords:
Cc: Triage Stage: Accepted
Has patch: yes Needs documentation: no
Needs tests: no Patch needs improvement: no
Easy pickings: yes UI/UX: no

Description

The docs for ForeignKey, ManyToManyField and OneToOneField list othermodel as their first parameter, but the sources they link to use to:

https://docs.djangoproject.com/en/1.11/ref/models/fields/#foreignkey
https://docs.djangoproject.com/en/1.11/ref/models/fields/#manytomanyfield
https://docs.djangoproject.com/en/1.11/ref/models/fields/#onetoonefield

This will throw a "missing 1 required positional argument" error for anyone trying to call their constructors with named arguments.

Change History (3)

comment:1 Changed 2 years ago by Tim Graham

Has patch: set
Triage Stage: UnreviewedAccepted

comment:2 Changed 2 years ago by Tim Graham <timograham@…>

Resolution: fixed
Status: newclosed

In 6e4a345:

Fixed #28557 -- Fixed ForeignKey/OneToOneField/ManyToManyField argument name in docs.

comment:3 Changed 2 years ago by Tim Graham <timograham@…>

In d236f30:

[1.11.x] Fixed #28557 -- Fixed ForeignKey/OneToOneField/ManyToManyField argument name in docs.

Backport of 6e4a34580d05ca8036c2bc1f7a53558cdc0cc77f from master

Note: See TracTickets for help on using tickets.
Back to Top