Opened 3 weeks ago

Last modified 2 weeks ago

#28761 assigned Cleanup/optimization

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 (9)

comment:1 Changed 3 weeks ago by Jay Welborn

Type: UncategorizedCleanup/optimization

comment:2 Changed 3 weeks ago by Tim Graham

Summary: Documentation doesn't cover prefixes in InlineFormsetsDocument prefixes in InlineFormsets
Triage Stage: UnreviewedAccepted

comment:3 Changed 3 weeks ago by Jay Welborn

Last edited 3 weeks ago by Jay Welborn (previous) (diff)

comment:4 Changed 3 weeks ago by Jay Welborn

Has patch: set

Opened PR #9320

Last edited 3 weeks ago by Jay Welborn (previous) (diff)

comment:5 Changed 2 weeks ago by Tim Martin

Patch needs improvement: set

This looks good, thanks for documenting. I added one (and a half!) comments on the pull request.

comment:6 Changed 2 weeks ago by Jay Welborn

Thanks for reviewing this. I agree printing the formset looked messy, so I've updated the PR

comment:7 Changed 2 weeks ago by Tim Martin

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 Changed 2 weeks ago by Tim Martin

Triage Stage: AcceptedReady 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 Changed 2 weeks ago by Jay Welborn

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.

Note: See TracTickets for help on using tickets.
Back to Top