#28761 closed Cleanup/optimization (fixed)
Document prefixes in InlineFormsets
Reported by: | Jay Welborn | Owned by: | Jay Welborn |
---|---|---|---|
Component: | Documentation | Version: | 1.11 |
Severity: | Normal | Keywords: | InlineFormsets |
Cc: | Triage Stage: | Ready for checkin | |
Has patch: | yes | Needs documentation: | no |
Needs tests: | no | Patch needs improvement: | no |
Easy pickings: | yes | UI/UX: | no |
Description
When using inlineformset_factory to create an Inline Formset, django sets the formset's prefix
to the related name
from the child model. The Inline Formset topic guide doesn't mention this.
I struggled with this trying to test an InlineFormset, and I'd like to add an example to the documentation to clarify this behavior. If this is something the community wants, I'll write the example and send a PR.
Change History (15)
comment:1 by , 7 years ago
Type: | Uncategorized → Cleanup/optimization |
---|
comment:2 by , 7 years ago
Summary: | Documentation doesn't cover prefixes in InlineFormsets → Document prefixes in InlineFormsets |
---|---|
Triage Stage: | Unreviewed → Accepted |
comment:5 by , 7 years ago
Patch needs improvement: | set |
---|
This looks good, thanks for documenting. I added one (and a half!) comments on the pull request.
comment:6 by , 7 years ago
Thanks for reviewing this. I agree printing the formset looked messy, so I've updated the PR
comment:7 by , 7 years ago
Patch needs improvement: | unset |
---|
Since you've addressed my comments, I think it's correct to remove the "patch needs improvement" flag so that it's visible in the reports. I'll re-review now.
comment:8 by , 7 years ago
Triage Stage: | Accepted → Ready for checkin |
---|
Looks good to me. The two commits will need to be squashed into a single commit that follows the guidelines for commit messages.
comment:9 by , 7 years ago
I squashed my commits, but now I'm failing one of the automated checks. Not exactly sure why, and I'm not super familiar with Jenkins.
If there's anything I can do on my end to fix it let me know.
comment:10 by , 7 years ago
Triage Stage: | Ready for checkin → Accepted |
---|
The latest version of the patch hasn't been reviewed yet.
comment:11 by , 7 years ago
Patch looks good. It's just lacking an addition to AUTHORS (and query the CLA submission).
comment:12 by , 7 years ago
Patch needs improvement: | set |
---|
comment:13 by , 7 years ago
Patch needs improvement: | unset |
---|---|
Triage Stage: | Accepted → Ready for checkin |
Clearing the "Patch needs improvement" to not block on the AUTHOR edit and CLA submission.
Opened PR #9320