Opened 19 years ago
Closed 19 years ago
#390 closed defect (invalid)
corrections for model reference documentation
Reported by: | anonymous | Owned by: | Jacob |
---|---|---|---|
Component: | Documentation | Version: | |
Severity: | trivial | Keywords: | |
Cc: | Triage Stage: | Unreviewed | |
Has patch: | no | Needs documentation: | no |
Needs tests: | no | Patch needs improvement: | no |
Easy pickings: | no | UI/UX: | no |
Description
In using the ManyToOneField to relate a model to another model multiple times, it turned out to be necessary to use the name parameter (to avoid identical field names in SQL). This is done in the short piece of example code but not documented in the surrounding text.
It is undocumented how to use unique_together with ManyToOneFields (whose field names are automagically generated), though it is possible to figure it out using the generated SQL.
Note:
See TracTickets
for help on using tickets.
This is no longer valid, as of [549].