#19824 closed Uncategorized (fixed)
Technically ambiguous reference docs for Field.primary_key
Reported by: | Owned by: | nobody | |
---|---|---|---|
Component: | Documentation | Version: | dev |
Severity: | Normal | Keywords: | |
Cc: | Triage Stage: | Unreviewed | |
Has patch: | yes | Needs documentation: | no |
Needs tests: | no | Patch needs improvement: | no |
Easy pickings: | no | UI/UX: | no |
Description
In the Model Field Reference, the description for Field.primary_key says that Django will automatically add an IntegerField to hold the primary key - this is semi-correct, because Django actually provides an AutoField, itself internally represented as an IntegerField.
I've provided a proposed fix in this branch on GH. The only commit is this one, which boils down to two changes:
- Changed IntegerField to AutoField. This should be OK, as the AutoField documentation describes it being an IntegerField.
- Removed pluralisation in "for any fields in …", changing to "for any field in …" as there can be only one on a model.
Note:
See TracTickets
for help on using tickets.
In 218bbef0c4890b3b853dee945a02215533b923b7: