[Django] #28761: Documentation doesn't cover prefixes in InlineFormsets

7 views
Skip to first unread message

Django

unread,
Oct 31, 2017, 3:08:35 PM10/31/17
to django-...@googlegroups.com
#28761: Documentation doesn't cover prefixes in InlineFormsets
-----------------------------------------+--------------------------------
Reporter: Jay Welborn | Owner: Jay Welborn
Type: Uncategorized | Status: assigned
Component: Documentation | Version: 1.11
Severity: Normal | Keywords: InlineFormsets
Triage Stage: Unreviewed | Has patch: 0
Needs documentation: 0 | Needs tests: 0
Patch needs improvement: 0 | Easy pickings: 1
UI/UX: 0 |
-----------------------------------------+--------------------------------
When using [https://docs.djangoproject.com/en/1.11/ref/forms/models
/#inlineformset-factory inlineformset_factory] to create an Inline
Formset, django sets the formset's `prefix` to the `related name` from the
child model. The
[https://docs.djangoproject.com/en/1.11/topics/forms/modelforms/#inline-
formsets 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.

--
Ticket URL: <https://code.djangoproject.com/ticket/28761>
Django <https://code.djangoproject.com/>
The Web framework for perfectionists with deadlines.

Django

unread,
Oct 31, 2017, 3:09:20 PM10/31/17
to django-...@googlegroups.com
#28761: Documentation doesn't cover prefixes in InlineFormsets
-------------------------------------+-------------------------------------

Reporter: Jay Welborn | Owner: Jay
Type: | Welborn
Cleanup/optimization | Status: assigned
Component: Documentation | Version: 1.11
Severity: Normal | Resolution:

Keywords: InlineFormsets | Triage Stage:
| Unreviewed
Has patch: 0 | Needs documentation: 0
Needs tests: 0 | Patch needs improvement: 0
Easy pickings: 1 | UI/UX: 0
-------------------------------------+-------------------------------------
Changes (by Jay Welborn):

* type: Uncategorized => Cleanup/optimization


--
Ticket URL: <https://code.djangoproject.com/ticket/28761#comment:1>

Django

unread,
Nov 1, 2017, 11:21:14 AM11/1/17
to django-...@googlegroups.com
#28761: Document prefixes in InlineFormsets
-------------------------------------+-------------------------------------

Reporter: Jay Welborn | Owner: Jay
Type: | Welborn
Cleanup/optimization | Status: assigned
Component: Documentation | Version: 1.11
Severity: Normal | Resolution:
Keywords: InlineFormsets | Triage Stage: Accepted

Has patch: 0 | Needs documentation: 0
Needs tests: 0 | Patch needs improvement: 0
Easy pickings: 1 | UI/UX: 0
-------------------------------------+-------------------------------------
Changes (by Tim Graham):

* stage: Unreviewed => Accepted


--
Ticket URL: <https://code.djangoproject.com/ticket/28761#comment:2>

Django

unread,
Nov 1, 2017, 3:48:29 PM11/1/17
to django-...@googlegroups.com
#28761: Document prefixes in InlineFormsets
-------------------------------------+-------------------------------------
Reporter: Jay Welborn | Owner: Jay
Type: | Welborn
Cleanup/optimization | Status: assigned
Component: Documentation | Version: 1.11

Severity: Normal | Resolution:
Keywords: InlineFormsets | Triage Stage: Accepted
Has patch: 0 | Needs documentation: 0
Needs tests: 0 | Patch needs improvement: 0
Easy pickings: 1 | UI/UX: 0
-------------------------------------+-------------------------------------

Comment (by Jay Welborn):

Opened PR [https://github.com/django/django/pull/9320 #9320]

--
Ticket URL: <https://code.djangoproject.com/ticket/28761#comment:3>

Django

unread,
Nov 1, 2017, 3:49:36 PM11/1/17
to django-...@googlegroups.com
#28761: Document prefixes in InlineFormsets
-------------------------------------+-------------------------------------
Reporter: Jay Welborn | Owner: Jay
Type: | Welborn
Cleanup/optimization | Status: assigned
Component: Documentation | Version: 1.11

Severity: Normal | Resolution:
Keywords: InlineFormsets | Triage Stage: Accepted
Has patch: 1 | Needs documentation: 0

Needs tests: 0 | Patch needs improvement: 0
Easy pickings: 1 | UI/UX: 0
-------------------------------------+-------------------------------------
Changes (by Jay Welborn):

* has_patch: 0 => 1


--
Ticket URL: <https://code.djangoproject.com/ticket/28761#comment:4>

Django

unread,
Nov 6, 2017, 4:35:03 PM11/6/17
to django-...@googlegroups.com
#28761: Document prefixes in InlineFormsets
-------------------------------------+-------------------------------------
Reporter: Jay Welborn | Owner: Jay
Type: | Welborn
Cleanup/optimization | Status: assigned
Component: Documentation | Version: 1.11

Severity: Normal | Resolution:
Keywords: InlineFormsets | Triage Stage: Accepted
Has patch: 1 | Needs documentation: 0
Needs tests: 0 | Patch needs improvement: 1

Easy pickings: 1 | UI/UX: 0
-------------------------------------+-------------------------------------
Changes (by Tim Martin):

* needs_better_patch: 0 => 1


Comment:

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

--
Ticket URL: <https://code.djangoproject.com/ticket/28761#comment:5>

Django

unread,
Nov 7, 2017, 6:12:34 AM11/7/17
to django-...@googlegroups.com
#28761: Document prefixes in InlineFormsets
-------------------------------------+-------------------------------------
Reporter: Jay Welborn | Owner: Jay
Type: | Welborn
Cleanup/optimization | Status: assigned
Component: Documentation | Version: 1.11

Severity: Normal | Resolution:
Keywords: InlineFormsets | Triage Stage: Accepted
Has patch: 1 | Needs documentation: 0
Needs tests: 0 | Patch needs improvement: 1

Easy pickings: 1 | UI/UX: 0
-------------------------------------+-------------------------------------

Comment (by Jay Welborn):

Thanks for reviewing this. I agree printing the formset looked messy, so
I've updated [https://github.com/django/django/pull/9320 the PR]

--
Ticket URL: <https://code.djangoproject.com/ticket/28761#comment:6>

Django

unread,
Nov 7, 2017, 3:27:50 PM11/7/17
to django-...@googlegroups.com
#28761: Document prefixes in InlineFormsets
-------------------------------------+-------------------------------------
Reporter: Jay Welborn | Owner: Jay
Type: | Welborn
Cleanup/optimization | Status: assigned
Component: Documentation | Version: 1.11

Severity: Normal | Resolution:
Keywords: InlineFormsets | Triage Stage: Accepted
Has patch: 1 | Needs documentation: 0

Needs tests: 0 | Patch needs improvement: 0
Easy pickings: 1 | UI/UX: 0
-------------------------------------+-------------------------------------
Changes (by Tim Martin):

* needs_better_patch: 1 => 0


Comment:

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.

--
Ticket URL: <https://code.djangoproject.com/ticket/28761#comment:7>

Django

unread,
Nov 7, 2017, 3:32:13 PM11/7/17
to django-...@googlegroups.com
#28761: Document prefixes in InlineFormsets
-------------------------------------+-------------------------------------
Reporter: Jay Welborn | Owner: Jay
Type: | Welborn
Cleanup/optimization | Status: assigned
Component: Documentation | Version: 1.11
Severity: Normal | Resolution:
Keywords: InlineFormsets | Triage Stage: Ready for
| checkin
Has patch: 1 | Needs documentation: 0

Needs tests: 0 | Patch needs improvement: 0
Easy pickings: 1 | UI/UX: 0
-------------------------------------+-------------------------------------
Changes (by Tim Martin):

* stage: Accepted => Ready for checkin


Comment:

Looks good to me. The two commits will need to be squashed into a single
commit that follows
[https://docs.djangoproject.com/en/dev/internals/contributing/committing-
code/#committing-guidelines the guidelines for commit messages].

--
Ticket URL: <https://code.djangoproject.com/ticket/28761#comment:8>

Django

unread,
Nov 7, 2017, 4:28:25 PM11/7/17
to django-...@googlegroups.com
#28761: Document prefixes in InlineFormsets
-------------------------------------+-------------------------------------
Reporter: Jay Welborn | Owner: Jay
Type: | Welborn
Cleanup/optimization | Status: assigned
Component: Documentation | Version: 1.11

Severity: Normal | Resolution:
Keywords: InlineFormsets | Triage Stage: Ready for
| checkin
Has patch: 1 | Needs documentation: 0

Needs tests: 0 | Patch needs improvement: 0
Easy pickings: 1 | UI/UX: 0
-------------------------------------+-------------------------------------

Comment (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.

--
Ticket URL: <https://code.djangoproject.com/ticket/28761#comment:9>

Django

unread,
Jan 10, 2018, 2:17:12 PM1/10/18
to django-...@googlegroups.com
#28761: Document prefixes in InlineFormsets
-------------------------------------+-------------------------------------
Reporter: Jay Welborn | Owner: Jay
Type: | Welborn
Cleanup/optimization | Status: assigned
Component: Documentation | Version: 1.11
Severity: Normal | Resolution:
Keywords: InlineFormsets | Triage Stage: Accepted
Has patch: 1 | Needs documentation: 0

Needs tests: 0 | Patch needs improvement: 0
Easy pickings: 1 | UI/UX: 0
-------------------------------------+-------------------------------------
Changes (by Tim Graham):

* stage: Ready for checkin => Accepted


Comment:

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

--
Ticket URL: <https://code.djangoproject.com/ticket/28761#comment:10>

Django

unread,
Jan 11, 2018, 4:40:08 AM1/11/18
to django-...@googlegroups.com
#28761: Document prefixes in InlineFormsets
-------------------------------------+-------------------------------------
Reporter: Jay Welborn | Owner: Jay
Type: | Welborn
Cleanup/optimization | Status: assigned
Component: Documentation | Version: 1.11

Severity: Normal | Resolution:
Keywords: InlineFormsets | Triage Stage: Accepted
Has patch: 1 | Needs documentation: 0

Needs tests: 0 | Patch needs improvement: 0
Easy pickings: 1 | UI/UX: 0
-------------------------------------+-------------------------------------

Comment (by Carlton Gibson):

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

--
Ticket URL: <https://code.djangoproject.com/ticket/28761#comment:11>

Django

unread,
Jan 11, 2018, 6:14:40 AM1/11/18
to django-...@googlegroups.com
#28761: Document prefixes in InlineFormsets
-------------------------------------+-------------------------------------
Reporter: Jay Welborn | Owner: Jay
Type: | Welborn
Cleanup/optimization | Status: assigned
Component: Documentation | Version: 1.11

Severity: Normal | Resolution:
Keywords: InlineFormsets | Triage Stage: Accepted
Has patch: 1 | Needs documentation: 0
Needs tests: 0 | Patch needs improvement: 1

Easy pickings: 1 | UI/UX: 0
-------------------------------------+-------------------------------------
Changes (by Carlton Gibson):

* needs_better_patch: 0 => 1


--
Ticket URL: <https://code.djangoproject.com/ticket/28761#comment:12>

Django

unread,
Jan 11, 2018, 7:53:09 AM1/11/18
to django-...@googlegroups.com
#28761: Document prefixes in InlineFormsets
-------------------------------------+-------------------------------------
Reporter: Jay Welborn | Owner: Jay
Type: | Welborn
Cleanup/optimization | Status: assigned
Component: Documentation | Version: 1.11
Severity: Normal | Resolution:

Keywords: InlineFormsets | Triage Stage: Ready for
| checkin
Has patch: 1 | Needs documentation: 0

Needs tests: 0 | Patch needs improvement: 0
Easy pickings: 1 | UI/UX: 0
-------------------------------------+-------------------------------------
Changes (by Carlton Gibson):

* needs_better_patch: 1 => 0


* stage: Accepted => Ready for checkin


Comment:

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

--
Ticket URL: <https://code.djangoproject.com/ticket/28761#comment:13>

Django

unread,
Jan 13, 2018, 4:39:58 PM1/13/18
to django-...@googlegroups.com
#28761: Document prefixes in InlineFormsets
-------------------------------------+-------------------------------------
Reporter: Jay Welborn | Owner: Jay
Type: | Welborn
Cleanup/optimization | Status: closed
Component: Documentation | Version: 1.11
Severity: Normal | Resolution: fixed

Keywords: InlineFormsets | Triage Stage: Ready for
| checkin
Has patch: 1 | Needs documentation: 0

Needs tests: 0 | Patch needs improvement: 0
Easy pickings: 1 | UI/UX: 0
-------------------------------------+-------------------------------------
Changes (by Tim Graham <timograham@…>):

* status: assigned => closed
* resolution: => fixed


Comment:

In [changeset:"56e590cc0be4d8c8b6fe0967583a6e02d18ee03e" 56e590cc]:
{{{
#!CommitTicketReference repository=""
revision="56e590cc0be4d8c8b6fe0967583a6e02d18ee03e"
Fixed #28761 -- Documented how an inline formset's prefix works.
}}}

--
Ticket URL: <https://code.djangoproject.com/ticket/28761#comment:14>

Django

unread,
Jan 13, 2018, 4:40:11 PM1/13/18
to django-...@googlegroups.com
#28761: Document prefixes in InlineFormsets
-------------------------------------+-------------------------------------
Reporter: Jay Welborn | Owner: Jay
Type: | Welborn
Cleanup/optimization | Status: closed
Component: Documentation | Version: 1.11

Severity: Normal | Resolution: fixed
Keywords: InlineFormsets | Triage Stage: Ready for
| checkin
Has patch: 1 | Needs documentation: 0

Needs tests: 0 | Patch needs improvement: 0
Easy pickings: 1 | UI/UX: 0
-------------------------------------+-------------------------------------

Comment (by Tim Graham <timograham@…>):

In [changeset:"e5acbbe18e1f6840cea0c6f37f4ac7bfbdb04acc" e5acbbe]:
{{{
#!CommitTicketReference repository=""
revision="e5acbbe18e1f6840cea0c6f37f4ac7bfbdb04acc"
[2.0.x] Fixed #28761 -- Documented how an inline formset's prefix works.

Backport of 56e590cc0be4d8c8b6fe0967583a6e02d18ee03e from master
}}}

--
Ticket URL: <https://code.djangoproject.com/ticket/28761#comment:15>

Reply all
Reply to author
Forward
0 new messages