Re: [Django] #34023: inlines variable not bound in loop in ModelAdmin._create_formsets

3 views
Skip to first unread message

Django

unread,
Sep 19, 2022, 2:36:58 AM9/19/22
to django-...@googlegroups.com
#34023: inlines variable not bound in loop in ModelAdmin._create_formsets
--------------------------------------+------------------------------------
Reporter: Michał Pasternak | Owner: nobody
Type: Cleanup/optimization | Status: new
Component: contrib.admin | Version: dev
Severity: Normal | Resolution:
Keywords: | Triage Stage: Accepted
Has patch: 0 | Needs documentation: 0
Needs tests: 0 | Patch needs improvement: 0
Easy pickings: 0 | UI/UX: 0
--------------------------------------+------------------------------------

Comment (by Michał Pasternak):

OK, I will.

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

Django

unread,
Sep 19, 2022, 2:39:21 AM9/19/22
to django-...@googlegroups.com
#34023: inlines variable not bound in loop in ModelAdmin._create_formsets
--------------------------------------+------------------------------------
Reporter: Michał Pasternak | Owner: nobody
Type: Cleanup/optimization | Status: new
Component: contrib.admin | Version: dev
Severity: Normal | Resolution:
Keywords: | Triage Stage: Accepted
Has patch: 0 | Needs documentation: 0
Needs tests: 0 | Patch needs improvement: 0
Easy pickings: 0 | UI/UX: 0
--------------------------------------+------------------------------------

Comment (by Mariusz Felisiak):

TBH, since creating and calling internal functions is expensive, maybe
it's better to immediately check these conditions instead of using
`user_deleted_form()` 🤔

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

Django

unread,
Sep 19, 2022, 2:42:35 AM9/19/22
to django-...@googlegroups.com
#34023: inlines variable not bound in loop in ModelAdmin._create_formsets
--------------------------------------+------------------------------------
Reporter: Michał Pasternak | Owner: nobody
Type: Cleanup/optimization | Status: new
Component: contrib.admin | Version: dev
Severity: Normal | Resolution:
Keywords: | Triage Stage: Accepted
Has patch: 0 | Needs documentation: 0
Needs tests: 0 | Patch needs improvement: 0
Easy pickings: 0 | UI/UX: 0
--------------------------------------+------------------------------------

Comment (by Mariusz Felisiak):

Maybe it's more readable with `user_deleted_form()`, let's leave it for
now.

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

Django

unread,
Sep 24, 2022, 5:08:55 AM9/24/22
to django-...@googlegroups.com
#34023: inlines variable not bound in loop in ModelAdmin._create_formsets
--------------------------------------+------------------------------------
Reporter: Michał Pasternak | Owner: nobody
Type: Cleanup/optimization | Status: new
Component: contrib.admin | Version: dev
Severity: Normal | Resolution:
Keywords: | Triage Stage: Accepted
Has patch: 1 | Needs documentation: 0

Needs tests: 0 | Patch needs improvement: 0
Easy pickings: 0 | UI/UX: 0
--------------------------------------+------------------------------------
Changes (by Michał Pasternak):

* has_patch: 0 => 1


Comment:

Patch https://github.com/django/django/pull/16089

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

Django

unread,
Sep 24, 2022, 5:23:07 AM9/24/22
to django-...@googlegroups.com
#34023: inlines variable not bound in loop in ModelAdmin._create_formsets
-------------------------------------+-------------------------------------
Reporter: Michał Pasternak | Owner: Michał
Type: | Pasternak
Cleanup/optimization | Status: assigned

Component: contrib.admin | Version: dev
Severity: Normal | Resolution:
Keywords: | Triage Stage: Ready for
| checkin

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

* owner: nobody => Michał Pasternak
* status: new => assigned
* stage: Accepted => Ready for checkin


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

Django

unread,
Sep 24, 2022, 6:16:38 AM9/24/22
to django-...@googlegroups.com
#34023: inlines variable not bound in loop in ModelAdmin._create_formsets
-------------------------------------+-------------------------------------
Reporter: Michał Pasternak | Owner: Michał
Type: | Pasternak
Cleanup/optimization | Status: closed
Component: contrib.admin | Version: dev
Severity: Normal | Resolution: fixed

Keywords: | Triage Stage: Ready for
| checkin
Has patch: 1 | Needs documentation: 0
Needs tests: 0 | Patch needs improvement: 0
Easy pickings: 0 | UI/UX: 0
-------------------------------------+-------------------------------------
Changes (by GitHub <noreply@…>):

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


Comment:

In [changeset:"0f31d10c7cf94318395f51d2613297acf1970e69" 0f31d10]:
{{{
#!CommitTicketReference repository=""
revision="0f31d10c7cf94318395f51d2613297acf1970e69"
Fixed #34023 -- Added inline argument to user_deleted_form().

This binds the loop variable.
}}}

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

Reply all
Reply to author
Forward
0 new messages