[Django] #28372: Admin inline JS should fire signal on add/remove to other JS can react.

5 views
Skip to first unread message

Django

unread,
Jul 7, 2017, 12:35:14 AM7/7/17
to django-...@googlegroups.com
#28372: Admin inline JS should fire signal on add/remove to other JS can react.
------------------------------------------+------------------------
Reporter: Curtis Maloney | Owner: nobody
Type: New feature | Status: new
Component: contrib.admin | Version: 1.11
Severity: Normal | Keywords:
Triage Stage: Unreviewed | Has patch: 0
Needs documentation: 1 | Needs tests: 1
Patch needs improvement: 0 | Easy pickings: 1
UI/UX: 0 |
------------------------------------------+------------------------
Whilst chasing a bug reported to django-array-tags, I realised I needed to
init my tag widget every time a new row was added on an admin inline.

On perusal of the code, there is a callback each for added and removed,
but they're pre-set.

It would be simpler and more extensible to have these functions emit an
Event, and have widgets listen for these to do their own fixups.

This would also allow 3rd party widgets to partake.

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

Django

unread,
Jul 7, 2017, 7:48:06 AM7/7/17
to django-...@googlegroups.com
#28372: Admin inline JS should fire signal on add/remove to other JS can react.
--------------------------------+--------------------------------------

Reporter: Curtis Maloney | Owner: nobody
Type: New feature | Status: new
Component: contrib.admin | Version: 1.11
Severity: Normal | Resolution:

Keywords: | Triage Stage: Unreviewed
Has patch: 0 | Needs documentation: 1
Needs tests: 1 | Patch needs improvement: 0
Easy pickings: 1 | UI/UX: 0
--------------------------------+--------------------------------------

Comment (by Tim Graham):

Are you saying that the existing
[https://docs.djangoproject.com/en/dev/ref/contrib/admin/javascript
/#inline-form-events inline form events] are problematic? I'm not
completely clear what the issue is and what adjustments are needed.

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

Django

unread,
Jul 10, 2017, 1:27:54 PM7/10/17
to django-...@googlegroups.com
#28372: Admin inline JS should fire signal on add/remove to other JS can react.
--------------------------------+--------------------------------------

Reporter: Curtis Maloney | Owner: nobody
Type: New feature | Status: closed
Component: contrib.admin | Version: 1.11
Severity: Normal | Resolution: needsinfo

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

* status: new => closed
* resolution: => needsinfo


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

Django

unread,
Jul 14, 2017, 9:48:51 PM7/14/17
to django-...@googlegroups.com
#28372: Admin inline JS should fire signal on add/remove to other JS can react.
--------------------------------+--------------------------------------

Reporter: Curtis Maloney | Owner: nobody
Type: New feature | Status: closed
Component: contrib.admin | Version: 1.11
Severity: Normal | Resolution: needsinfo

Keywords: | Triage Stage: Unreviewed
Has patch: 0 | Needs documentation: 1
Needs tests: 1 | Patch needs improvement: 0
Easy pickings: 1 | UI/UX: 0
--------------------------------+--------------------------------------

Comment (by Curtis Maloney):

Besides being jQuery custom events, no. I didn't see them in my initial
perusal of the code.

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

Reply all
Reply to author
Forward
0 new messages