Opened 10 years ago
Closed 10 years ago
#23463 closed Cleanup/optimization (wontfix)
Add Historical models note to upload_to/limit_choices_to sections
Reported by: | José Padilla | Owned by: | José Padilla |
---|---|---|---|
Component: | Documentation | Version: | dev |
Severity: | Normal | Keywords: | |
Cc: | Triage Stage: | Accepted | |
Has patch: | no | Needs documentation: | no |
Needs tests: | no | Patch needs improvement: | no |
Easy pickings: | yes | UI/UX: | no |
Description
The Historial models section under the Migrations documentation (https://docs.djangoproject.com/en/dev/topics/migrations/#historical-models) mentions that "references to functions in field options such as upload_to and limit_choices_to are serialized in migrations, so the functions will need to be kept around for as long as there is a migration referencing them."
I think it'd be useful if we had a note regarding this, and probably linking to the existing mention, in the upload_to and limit_choices_to documentation sections.
Change History (5)
comment:1 by , 10 years ago
Triage Stage: | Unreviewed → Accepted |
---|---|
Version: | 1.7 → master |
comment:2 by , 10 years ago
comment:3 by , 10 years ago
Owner: | set to |
---|---|
Status: | new → assigned |
comment:4 by , 10 years ago
I'm not much of a fan of repeating the note for every field option that might be a function. For example, default
is often a function as well. "Note that references to functions in this field option" might be misleading, since it's really "references to functions in *all* field options". I don't really see a good place in the field reference guide for a common note though. I wonder if a new section in topics/db/models.txt
might be better.
comment:5 by , 10 years ago
Resolution: | → wontfix |
---|---|
Status: | assigned → closed |
Working on this here https://github.com/jpadilla/django/commit/43cdbeecc45402a0d1dec67960a8947c7a5a195f.
Need some guidance/review with wording and placement of the notes.