Opened 7 years ago

Closed 7 years ago

Last modified 7 years ago

#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 Jay Welborn, 7 years ago

Type: UncategorizedCleanup/optimization

comment:2 by Tim Graham, 7 years ago

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

comment:3 by Jay Welborn, 7 years ago

Last edited 7 years ago by Jay Welborn (previous) (diff)

comment:4 by Jay Welborn, 7 years ago

Has patch: set

Opened PR #9320

Last edited 7 years ago by Jay Welborn (previous) (diff)

comment:5 by Tim Martin, 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 Jay Welborn, 7 years ago

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

comment:7 by Tim Martin, 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 Tim Martin, 7 years ago

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 by Jay Welborn, 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 Tim Graham, 7 years ago

Triage Stage: Ready for checkinAccepted

The latest version of the patch hasn't been reviewed yet.

comment:11 by Carlton Gibson, 7 years ago

Patch looks good. It's just lacking an addition to AUTHORS (and query the CLA submission).

comment:12 by Carlton Gibson, 7 years ago

Patch needs improvement: set

comment:13 by Carlton Gibson, 7 years ago

Patch needs improvement: unset
Triage Stage: AcceptedReady for checkin

Clearing the "Patch needs improvement" to not block on the AUTHOR edit and CLA submission.

comment:14 by Tim Graham <timograham@…>, 7 years ago

Resolution: fixed
Status: assignedclosed

In 56e590cc:

Fixed #28761 -- Documented how an inline formset's prefix works.

comment:15 by Tim Graham <timograham@…>, 7 years ago

In e5acbbe:

[2.0.x] Fixed #28761 -- Documented how an inline formset's prefix works.

Backport of 56e590cc0be4d8c8b6fe0967583a6e02d18ee03e from master

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