Opened 10 years ago

Closed 9 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 Claude Paroz, 10 years ago

Triage Stage: UnreviewedAccepted
Version: 1.7master

comment:2 by José Padilla, 10 years ago

Working on this here https://github.com/jpadilla/django/commit/43cdbeecc45402a0d1dec67960a8947c7a5a195f.

Need some guidance/review with wording and placement of the notes.

comment:3 by José Padilla, 10 years ago

Owner: set to José Padilla
Status: newassigned

comment:4 by Tim Graham, 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 Tim Graham, 9 years ago

Resolution: wontfix
Status: assignedclosed
Note: See TracTickets for help on using tickets.
Back to Top